CVE-2026-120459
HighCVSS 7.4Summary
python-jose through 3.5.0 contains an authentication bypass vulnerability that allows unauthenticated attackers to forge JWTs because HMACKey and CryptographyHMACKey accept zero-length HMAC secrets. When an application's HS256/HS384/HS512 verification key resolves to empty, such as an oct JWK with empty k, attackers can forge tokens with arbitrary claims.
Risk Assessment
Attackers can create tokens accepted by jwt.decode and impersonate any user, gaining unauthorized access to protected resources.
Recommendation
Update python-jose beyond 3.5.0 and ensure HMAC keys are never empty.
Other vulnerabilities in python-jose
See all- CVE-2026-85394Critical
python-jose through 3.5.0 fails to properly validate asymmetric keys in HMAC initialization, accepting DER-encoded public keys that lack PEM armor or SSH prefixes. Attackers holding the service's public key can forge HS256 tokens that pass verification when algorithms are not explicitly restricted. This is an incomplete fix for CVE-2024-33663.
- CVE-2016-7036Critical
Versions of python-jose before 1.3.2 do not use constant time comparison for HMAC keys, which can be leveraged by attackers in unspecified ways.
- CVE-2024-29370Medium
In python-jose 3.3.0 (specifically jwe.decrypt), a vulnerability allows an attacker to cause a Denial-of-Service (DoS) condition by crafting a malicious JSON Web Encryption (JWE) token with an exceptionally high compression ratio. When this token is processed by the server, it results in significant memory allocation and processing time during decompression.
Original NVD description (English source)
python-jose through 3.5.0 contains an authentication bypass vulnerability that allows unauthenticated attackers to forge JWTs because HMACKey and CryptographyHMACKey accept zero-length HMAC secrets. When an application's HS256/HS384/HS512 verification key resolves to empty, such as an oct JWK with empty k, attackers can forge tokens with arbitrary claims that jwt.decode accepts.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

