python-jose JWT Authentication Bypass Vulnerability via 'alg=none'

Vulnerability

A vulnerability in the python-jose library, affecting versions through 3.3.0, allows JWT tokens with 'alg=none' to be decoded and accepted without any cryptographic signature verification. This flaw enables a malicious actor to craft a forged token with arbitrary claims, such as 'is_admin=true', and bypass authentication checks. Consequently, this could lead to privilege escalation or unauthorized access in applications that rely on python-jose for token validation. The issue arises because the library does not enforce rejection of 'alg=none' tokens, leaving a gap that can be exploited.

Impact

Exploitation of this vulnerability bypasses authentication, allowing unauthorized access and privilege escalation in affected applications. It could also lead to a denial-of-service condition in authentication layers.

Reproduction

To reproduce this vulnerability, create a JWT token with the 'alg' header set to 'none' and include arbitrary claims in the payload. When this token is decoded using python-jose without verifying the signature, the claims are accepted as valid, effectively bypassing authentication. This can be done by using the jwt.decode() function with the options parameter set to disable signature verification.

Remediation

Until an official patch is released, developers should explicitly reject 'alg=none' tokens before decoding them. Additionally, signature verification should be enforced using strong algorithms like HS256 or RS256. It is also advisable to audit all points where JWTs are parsed to ensure that unsigned tokens are not accepted.

Added: Oct 10, 2025, 2:18 PM
Updated: Oct 10, 2025, 3:20 PM

Vulnerability Rating

Custom Algorithm
spread
5.4
impact
5.0
exploitability
6.0
remediation
7.9
relevance
0.7
threat
6.4
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.