CVE-2026-27962
Critical · 9.1CVSS
9.1
EPSS
0.5%
Published
Mar 16, 2026
CISA due date
—
Cloudanix analysis
A widely used login-token library could be tricked into trusting a fake token an outsider created, which could let them sign in or use APIs as someone else until the library is updated.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Library
- Class
- Cryptographic Weakness
- Remediation
- Upgrade
- Effort
- Low
- Patch risk
- Low
What it actually does
Authlib’s JWS deserialization, when invoked without an application-supplied verification key (key=None), trusts the attacker-controlled jwk header inside the JWT and uses that embedded public key to verify the signature. Signature verification therefore no longer proves possession of a server-trusted key: any self-signed JWT whose public key is carried in the header is treated as cryptographically valid, fully bypassing authentication and authorization that depend on JWS/JWT integrity.
Why it matters to the business
Any product that uses vulnerable Authlib to gate logins, APIs, or OAuth/OpenID Connect flows can have those controls silently defeated, enabling account takeover, unauthorized API access, and data disclosure or tampering. Impact is highest for internet-facing identity and API services. The issue is unauthenticated and network-reachable (CVSS 9.1) and should be treated as high priority even though it is not on CISA KEV, is not tied to ransomware, has no reported in-the-wild exploit maturity, and currently has a low EPSS (~0.5%, slightly declining). Upgrade remaining unpatched dependents promptly.
How an attack unfolds
An unauthenticated remote attacker generates their own key pair, builds a JWT with chosen identity and privilege claims, signs it with the private key, and places the matching public key in the JWT jwk header. If the target calls Authlib JWS deserialize/verify without passing a trusted key, the library extracts the header-embedded key and confirms the signature against it. The forged token is accepted as valid, so the attacker impersonates users or assumes roles without credentials. No named threat actors or KEV campaigns are associated with this CVE at present.
How to fix it
Upgrade the authlib package to 1.6.9 or later in all applications, services, and lockfiles (pip, Poetry, pip-tools, uv, conda). After upgrading, require every JWS/JWT verification call to pass an application-controlled key or JWKS; never rely on keys taken from the token header. Search code and dependencies for JWS deserialize/decode/verify calls that omit a key or pass key=None, and for any acceptance of the jwk header parameter. Rotate signing keys and invalidate sessions or refresh tokens issued while vulnerable versions were in production if token forgery cannot be ruled out. Pin and monitor authlib so it cannot regress below 1.6.9.
How to confirm the fix worked
Confirm installed authlib is 1.6.9 or newer (pip show authlib, poetry show authlib, or lockfile review) in every runtime image and virtualenv. Statically search for JWS verification without an explicit key and for use of the jwk header. In a non-production check, verify that tokens whose only verification material is a header-embedded jwk are rejected after the upgrade. Regression-test legitimate JWKS/key-based verification still succeeds. Inventory transitive dependents of authlib across services.
Typical attack path
- Identify an application that verifies JWTs with Authlib JWS and does not pass an explicit trusted key (key=None or equivalent).
- Create an attacker-controlled signing key pair.
- Produce a JWT with attacker-chosen claims, signed with that private key and carrying the corresponding public key in the jwk header.
- Submit the token to an authentication, SSO, or API endpoint that deserializes it with Authlib.
- Receive a session, token, or API response granted on the basis of the forged claims and act with the corresponding privileges.
How to detect it
This flaw leaves no unique malware implant; evidence is in authentication logs and captured tokens. Hunt historical HTTP access, API gateway, IdP, and application auth logs for Bearer JWTs whose decoded protected header contains a jwk object, especially where verification succeeded. Compare the key in that header (or the effective kid/thumbprint) against the service’s trusted JWKS—a match to an unknown key on a successful login or API call is a strong signal. Review application debug or exception logs around Authlib/JWS verification for acceptance of header-supplied keys. Check whether new users, privilege changes, or high-value API calls clustered around tokens that were not signed by your keys. Package and image inventories showing authlib < 1.6.9 indicate exposure, not necessarily compromise. There are no named APT mappings; use these artifacts rather than actor-specific IOCs.
- Decoded JWT protected header JSON containing a "jwk" member
- HTTP Authorization: Bearer tokens whose first (header) segment base64url-decodes to JSON with "jwk"
- Successful auth/API events where the verifying key thumbprint is absent from the application JWKS
- authlib distribution/version evidence: authlib<1.6.9 in site-packages, METADATA, or lockfiles (exposure indicator)
- Python import/runtime of authlib.jose JWS deserialize/verify without an explicit key argument (code-level exposure)
What your security team should do
- Patch authlib to 1.6.9+ everywhere it is used, treating internet-facing auth and API services first.
- Ban key=None / missing-key JWS verification in code review and SAST; require an explicit trusted key or JWKS.
- Inventory all Python services for authlib < 1.6.9 via SCA and lockfiles, including transitive use.
- If a vulnerable verifier was exposed, rotate JWT signing keys and revoke or re-issue sessions and refresh tokens.
- Add detection for JWTs that carry a jwk header on authentication paths and alert on successful auths not matching the trusted JWKS.
- Keep authlib pinned at or above 1.6.9 in base images and dependency policy.
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| SUSE:Linux Enterprise Module for Python 3 15 SP7 | python-Authlib | 0 | 1.3.1-150600.3.17.1 |
| SUSE:Linux Enterprise Server 15 SP6-LTSS | python-Authlib | 0 | 1.3.1-150600.3.17.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP6 | python-Authlib | 0 | 1.3.1-150600.3.17.1 |
| openSUSE:Leap 15.6 | python-Authlib | 0 | 1.3.1-150600.3.17.1 |
| openSUSE:Leap 16.0 | python-Authlib | 0 | 1.5.2-bp160.3.1 |
Related vulnerabilities
- CVE-2026-28490 Authlib is a Python library which builds OAuth and OpenID Connect servers. Also affects python-Authlib
- CVE-2026-28498 Authlib is a Python library which builds OAuth and OpenID Connect servers. Also affects python-Authlib
- CVE-2025-68158 Authlib is a Python library which builds OAuth and OpenID Connect servers. Also affects python-Authlib
- CVE-2025-62706 Authlib : JWE zip=DEF decompression bomb enables DoS Also affects python-Authlib
- CVE-2025-61920 Authlib is vulnerable to Denial of Service via Oversized JOSE Segments Also affects python-Authlib
- CVE-2026-87947 Improper Verification of Cryptographic Signature vulnerability in Drupal SAML SSO… CWE-347
- CVE-2026-84918 Improper Verification of Cryptographic Signature vulnerability in Drupal Monobank payment… CWE-347
- CVE-2026-102271 PyJWT is a Python implementation of JSON Web Token standards. CWE-347