CVE-2025-59420·Python vulnerability
Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to version 1.6.4, Authlib’s JWS verification accepts tokens that declare unknown critical header parameters (crit), violating RFC 7515 “must‑understand” semantics. An attacker can craft a signed token with a critical header (for example, bork or cnf) that strict verifiers reject but Authlib accepts. In mixed‑language fleets, this enables split‑brain verification and can lead to policy bypass, replay, or privilege escalation. This issue has been patched in version 1.6.4.
- Severity
- high
- Software
- Python
- Fixed in
- 1.6.4
- Published
- 2025-09-22
Affected versions
Until: 1.6.4
Fixed in: 1.6.4
How to fix this CVE
Update Authlib to version 1.6.4 or later to fix a critical JWT validation bypass vulnerability. This vulnerability allows attackers to craft tokens with unknown critical header parameters that bypass strict verification in multi-language environments. Immediate patching is recommended for any systems using Authlib for OAuth/OpenID Connect operations.
sudo dnf update python3-authlib && pip3 install --upgrade authlib>=1.6.4Defensia detects this vulnerability
How to check if you are affected
- Check installed Authlib version: python3 -c "import authlib; print(authlib.__version__)"
- Verify if your application imports authlib.jose or authlib.oauth2 modules: grep -r "from authlib" /path/to/your/app
- Search application logs for JWS verification errors or token rejection patterns: grep -E "(jws|token|verify|critical)" /var/log/application.log
- Confirm the patch was applied by re-running the version check and confirming version >= 1.6.4
FAQ
What is CVE-2025-59420?
CVE-2025-59420 is a JWT validation flaw in Authlib where the library incorrectly accepts tokens with unknown critical header parameters, violating RFC 7515 semantics. This allows attackers to craft malicious tokens that pass Authlib validation but fail in stricter implementations, enabling policy bypass and privilege escalation.
Is CVE-2025-59420 being actively exploited?
No, CVE-2025-59420 is not currently listed on the CISA KEV catalog and has no public exploits available. However, the vulnerability's nature makes it a high-priority fix for production OAuth/OpenID Connect deployments.
What versions of Python are affected by CVE-2025-59420?
All versions of Authlib prior to 1.6.4 are affected. The vulnerability exists in Authlib's JWS verification logic, which is independent of the Python version itself, though Python 3.6+ is required for Authlib.
How do I check if my server is vulnerable to CVE-2025-59420?
Run: python3 -c "import authlib; print('Vulnerable' if authlib.__version__ < '1.6.4' else 'Patched')" or use pip show authlib | grep Version
Does Defensia detect CVE-2025-59420?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Authlib is installed on a monitored server, CVE-2025-59420 will appear in your dashboard with remediation steps.
Related Python CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2025-59420. Free for 1 server.
Get started free