Authlib JWK Header Injection (CVE-2026-27962)
CVE-2026-27962
Patch now for CVE-2026-27962: critical Authlib JWT deserialization flaw lets attackers bypass authentication, impersonate admins, and seize control. Upgrade to 1.6.9.
Patch now - CVE-2026-27962 is a critical JWT signature verification bypass in Authlib versions prior to 1.6.9 that grants unauthenticated attackers complete authentication bypass through maliciously-crafted tokens. Upgrade to version 1.6.9 immediately.
Overview
A critical security flaw has been discovered in Authlib, a popular Python library for building OAuth and OpenID Connect servers. This vulnerability, tracked as CVE-2026-27962, allows an unauthenticated attacker to forge JSON Web Tokens (JWTs) that are incorrectly accepted as valid by an affected server. This can lead to a complete bypass of authentication and authorization controls.
Vulnerability Explained
In simple terms, this is a signature verification bypass. When an application uses a vulnerable version of Authlib to check the digital signature of a JWT (a common security token), the library can be tricked into using a cryptographic key supplied by the attacker within the token itself, instead of using the server’s own trusted key.
The flaw exists in the JWS (JSON Web Signature) deserialization functions. If the function is called with key=None, the library will extract the key from the token’s jwk header field, which is controlled by the attacker. An attacker can sign a malicious token with their own private key, embed the corresponding public key in the header, and the vulnerable server will accept it as legitimate.
Impact
The impact of this vulnerability is severe. By forging valid JWTs, an attacker can:
- Impersonate any user, including administrators.
- Gain unauthorized access to protected data and functions.
- Completely bypass login systems and API authentication.
- Potentially take full control of applications relying on Authlib for security.
With a CVSS score of 9.1 (CRITICAL), this flaw represents a major threat to any application using a vulnerable version of Authlib for processing JWTs. Successful exploitation could lead to significant data breaches; you can review historical incidents in our breach reports to understand potential consequences.
Remediation and Mitigation
Immediate action is required to secure affected systems.
Primary Fix: Update Authlib The issue is patched in Authlib version 1.6.9. All users must upgrade immediately.
pip install --upgrade authlib>=1.6.9
Verification and Mitigation:
- Inventory: Identify all applications and services that depend on the Python
authlibpackage. - Version Check: Verify the installed version. Any version prior to 1.6.9 is vulnerable.
- Code Review: Check your code for calls to JWS deserialization functions (like
jose.jwt.decodewithJWSalgorithms) where thekeyparameter might be implicitly or explicitly set toNone. Ensure a trusted, server-side key is always provided for verification. - Monitor: Closely monitor authentication logs for any suspicious activity or unexpected token issuances. Staying informed on emerging threats is crucial; follow the latest developments in our security news section.
After patching, consider conducting a security review to ensure no unauthorized access occurred during the window of vulnerability.
Never miss a critical vulnerability
Get real-time security alerts delivered to your preferred platform.
Am I Affected by CVE-2026-27962?
Pick an ecosystem, paste your installed version, and we'll compare it against the fixed version published on OSV.dev. Browser-only — nothing is sent to a server.
Heuristic comparison only. Always cross-check against the vendor advisory before making patching decisions.
Related Advisories
ZEBRA is a Zcash node written entirely in Rust. Prior to zebrad version 4.4.0 and prior to zebra-script version 6.0.0, the fix for CVE-2026-41583 introduced a separate issue due to insufficient error ...
Missing JWT signature verification in AWS Ops Wheel allows unauthenticated attackers to forge JWT tokens and gain unintended administrative access to the application, including the ability to read, mo...
A condition in ScreenConnect may allow an actor with access to server-level cryptographic material used for authentication to obtain unauthorized access, including elevated privileges, in certain scen...
JOSE is a Javascript Object Signing and Encryption (JOSE) library. Prior to version 0.3.5+1, a vulnerability in jose could allow an unauthenticated, remote attacker to forge valid JWS/JWT tokens by us...