Impact
Authlib's JWS implementation has a JWK Header Injection flaw that lets an unauthenticated attacker forge JWT tokens. By passing key=None to a JWS deserialization function, the library extracts the cryptographic key from an attacker‑controlled jwk header. The attacker signs the token with their private key, embeds the matching public key in the header, and the library accepts the forged token as valid, bypassing authentication and authorization. The flaw corresponds to CWE‑347 and can result in full unauthorized access to protected resources.
Affected Systems
Authlib, the Python OAuth/OpenID Connect library, is affected in all versions before 1.6.9. The known affected CPE is cpe:2.3:a:authlib:authlib:*:*:*:*:*:*:*:*. Updating to version 1.6.9 or later removes the vulnerability.
Risk and Exploitability
The CVSS score is 9.1, indicating high severity. EPSS is less than 1%, suggesting a low current exploitation probability, and the vulnerability is not listed in CISA's KEV catalog. The likely attack vector is that any application using Authlib to process user‑supplied JWTs could be tricked into accepting a forged token. Exploitation requires only the ability to supply a token, and the consequence is a complete authentication bypass, making it a critical risk for affected systems.
OpenCVE Enrichment
Github GHSA