Oauthlib · Oauthlib · CVE-2025-59420
**Name of the Vulnerable Software and Affected Versions**
Authlib versions prior to 1.6.4
**Description**
Authlib’s JWS verification improperly handles tokens declaring unknown critical header parameters (`crit`), violating RFC 7515 specifications. An attacker can create a signed token with a critical header (for example, `bork` or `cnf`) that strict verifiers would reject, but Authlib accepts. This can lead to split-brain verification, policy bypass, replay attacks, or privilege escalation in environments with mixed-language fleets. The issue occurs because Authlib does not enforce the “must-understand” semantics defined for the `crit` parameter in RFC 7515. The `deserialize compact()` API endpoint is affected. The `crit` parameter is a list of critical header parameters that a recipient must understand and enforce. When a token includes a `crit` parameter with an unknown name, strict verifiers reject the token, while Authlib accepts it. This discrepancy can be exploited in heterogeneous environments where some components are strict and others are lenient.
**Recommendations**
Update Authlib to version 1.6.4 or later.