CVE-2026-103001: PyJWT - Claims Verification Bypass Due to Options Dict Mutation
Summary
CVE-2026-103001: PyJWT.decode()/decode_complete() mutates a caller-supplied options dict in place whenever verify_signature is falsy, adding verify_exp/verify_nbf/verify_iat/verify_aud/verify_iss/verify_sub/verify_jti keys directly onto... Affects pyjwt versions >= 2.11.0, <= 2.13.0. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
PyJWT is a popular Python library used for encoding and decoding JSON Web Tokens (JWT). It allows developers to securely transmit information between parties as a JSON object. The library supports various algorithms for signing tokens and provides options for verifying claims such as expiration, audience, and issuer. However, a recent vulnerability has been identified that affects the integrity of claim verification when reusing mutable options dictionaries.
Vulnerability Detail
The vulnerability arises from the mutation of a caller-supplied options dictionary in the PyJWT.decode() and decode_complete() methods. When the verify_signature option is set to False, the library modifies the options dictionary in place, adding keys for claim verification (like verify_exp, verify_nbf, etc.). If the same options dictionary is reused in subsequent calls with verify_signature set to True, it can lead to silent acceptance of invalid tokens, bypassing important claim checks. This issue is a regression of a previously fixed problem and affects all versions from 2.11.0 to 2.13.0.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary workaround, avoid reusing mutable options dictionaries across calls to decode() or decode_complete(). Instead, create a new options dictionary for each call. For example:
import jwt
# Create a new options dictionary for each call
options1 = {"verify_signature": False}
options2 = {"verify_signature": True}
# Decode with the first options
jwt.decode(expired_token, options=options1)
# Decode with the second options
result = jwt.decode(expired_token, secret, algorithms=["HS256"], options=options2)
Conclusion
The vulnerability CVE-2026-103001 in PyJWT poses a significant risk by allowing silent claim verification bypass due to the mutation of options dictionaries. It is crucial to update to the patched version or implement workarounds to mitigate this risk.
See every vulnerability recorded for pyjwt →
FAQ
The vulnerability allows for silent claim verification bypass due to the mutation of a shared options dictionary.
Versions from 2.11.0 to 2.13.0 are affected by this vulnerability.
You can use Vulert's playground to check if your application is affected by this vulnerability without any signup.
The CVSS score of this vulnerability is 6.5, indicating a moderate severity level.
If you cannot update the package, ensure that you do not reuse mutable options dictionaries across calls to avoid the risk of bypassing claim checks.
References
Related vulnerabilities
Recent vulnerabilities recorded for pyjwt.