CVE-2026-27962·Python vulnerability
Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to version 1.6.9, a JWK Header Injection vulnerability in authlib's JWS implementation allows an unauthenticated attacker to forge arbitrary JWT tokens that pass signature verification. When key=None is passed to any JWS deserialization function, the library extracts and uses the cryptographic key embedded in the attacker-controlled JWT jwk header field. An attacker can sign a token with their own private key, embed the matching public key in the header, and have the server accept the forged token as cryptographically valid — bypassing authentication and authorization entirely. This issue has been patched in version 1.6.9.
- Severity
- critical
- Software
- Python
- Fixed in
- 1.6.9
- Published
- 2026-03-16
Affected versions
Until: 1.6.9
Fixed in: 1.6.9
How to fix this CVE
Update authlib to version 1.6.9 or later to fix a critical JWT header injection vulnerability that allows attackers to forge authentication tokens. This flaw affects Python applications using authlib's JWS deserialization functions with key=None parameters. Immediate patching is required to prevent authentication bypass attacks that could expose sensitive systems.
sudo dnf update python3-authlibDefensia detects this vulnerability
How to check if you are affected
- Check the installed authlib version: python3 -c "import authlib; print(authlib.__version__)"
- Verify if your application uses JWS deserialization: grep -r "jws.deserialize\|JWS\|key=None" /path/to/your/app --include="*.py"
- Search application logs for JWT validation errors or token_decode operations: grep -i "token\|jwt\|jws" /var/log/app.log | head -100
- After patching, confirm the update: python3 -c "import authlib; print(authlib.__version__)" and verify the version is >= 1.6.9
FAQ
What is CVE-2026-27962?
A critical JWT header injection flaw in authlib that enables attackers to create forged authentication tokens by embedding their own public key in the JWT header, bypassing signature verification when the library processes tokens without a pre-configured key.
Is CVE-2026-27962 being actively exploited?
No active exploitation has been reported in the CISA Known Exploited Vulnerabilities (KEV) catalog, but the critical CVSS score of 9.1 and ease of exploitation make immediate patching essential.
What versions of authlib are affected by CVE-2026-27962?
All versions of authlib prior to 1.6.9 are vulnerable; the fix was released in version 1.6.9.
How do I check if my server is vulnerable to CVE-2026-27962?
Run: python3 -c "import authlib; print(authlib.__version__)" and compare to 1.6.9 — if your version is lower, your system is vulnerable.
Does Defensia detect CVE-2026-27962?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If authlib is installed on a monitored server, CVE-2026-27962 will appear in your dashboard with remediation steps.
Related Python CVEs
References
- https://github.com/authlib/authlib/commit/a5d4b2d4c9e46bfa11c82f85fdc2bcc0b50ae681
- https://github.com/authlib/authlib/releases/tag/v1.6.9
- https://github.com/authlib/authlib/security/advisories/GHSA-wvwj-cvrp-7pv5
- https://access.redhat.com/errata/RHSA-2026:19375
- https://access.redhat.com/errata/RHSA-2026:24853
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-27962. Free for 1 server.
Get started free