Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

davedoesdev/python-jwt
master @ 3f664a8
6
Fixes
1
CVEs
CRITICAL
Peak severity
Highlights
Auth Bypass: 5 prior fixes. Scrutinize any change in this area.
jwt/__init__.py: most-fixed (3 issues). Treat as high-risk during review.
5 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Auth Bypass: Attackers could bypass signature verification entirely by exploiting lax validation between compact and JSON token representation formats (as seen in CVE-2022-39227), or by introducing unregistered/custom headers that circumvented the underlying jwcrypto library validation.
Auth Bypass: Lax enforcement of signature algorithms allowed attackers to bypass authentication by specifying the 'none' algorithm. Patches introduced mandatory algorithm validation and restricted parameter configurations to force explicit allowlisting.
Insufficient Entropy: A low default token identifier (JTI) size of 4 bytes compromised the uniqueness and unpredictability of generated JWTs, leaving the system susceptible to collision or guessing attacks before being increased to 16 bytes.