Cloudanix VulnDB

CVE-2026-114615

High · 7.4

CVSS

7.4

EPSS

0.2%

Published

Oct 22, 2026

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A flaw in a popular Python security library lets attackers fake login tokens and access systems they should not, even after an earlier fix was applied.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Moderate
Impact
Privilege Gain
Component
Library
Class
Cryptographic Weakness
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Authlib's OctKey.import_key() only checks for asymmetric key markers at byte zero, allowing prefixed PEM or certificate data (whitespace, comments, BOM) accepted by PEM loaders to be treated as an HMAC secret. This enables unauthenticated forgery of HS256-signed JWTs with arbitrary claims when the mixed algorithm registry is used.

Why it matters to the business

Attackers can impersonate any user or escalate privileges by forging valid tokens, leading to unauthorized access to protected resources and potential data breaches in OAuth/OIDC deployments relying on this library.

How an attack unfolds

An attacker obtains the public key bytes used for verification, crafts an HS256 JWT using those bytes as the HMAC secret with chosen claims, and submits it to an endpoint that accepts the mixed registry. The flawed import logic treats the prefixed asymmetric material as a symmetric key, bypassing signature checks.

How to fix it

Upgrade Authlib to version 1.9.0 or later. Ensure all verification uses the strict algorithm registry without mixing symmetric and asymmetric keys. Validate that PEM loaders reject unexpected prefixes during key import.

How to confirm the fix worked

Confirm library version is 1.9.0+. Test key import with prefixed PEM data to ensure asymmetric markers are still detected. Audit JWT verification code for use of the documented mixed algorithm registry.

Typical attack path

  1. Obtain the public key bytes or certificate configured for verification
  2. Construct a JWT header specifying HS256 and arbitrary claims
  3. Sign the token using the public key bytes as HMAC secret
  4. Submit the forged token to an authenticated endpoint
  5. Bypass authorization due to accepted signature

How to detect it

Inspect application logs for JWTs accepted with HS256 when asymmetric keys are configured. Search for token validation events using public key material as an HMAC secret. Review authentication flows for sudden privilege changes without corresponding user activity.

What your security team should do

  • Immediately upgrade all Authlib installations to 1.9.0
  • Review and restrict JWT algorithm registries to prevent HS256 with asymmetric keys
  • Monitor for unexpected JWT signature successes with known public keys
  • Rotate any exposed verification keys if exploitation is suspected

The record

Authlib is a Python library which builds OAuth and OpenID Connect servers. From 1.3.1 until 1.9.0, OctKey.import_key() checks asymmetric-key markers only at byte zero while Authlib's PEM loaders accept leading whitespace, comments, or a byte-order mark. In deployments that use the documented mixed algorithm registry and already configure verification with PEM or certificate bytes containing such a prefix, an unauthenticated attacker who knows those same public-key bytes can use them as an HMAC secret and forge HS256 tokens with arbitrary identity or authorization claims. This is a bypass of the remediation for CVE-2024-37568. The module-level jwt object reaches OctKey.import_key() in authlib/jose/rfc7518/oct_key.py, where POSSIBLE_UNSAFE_KEYS fails to identify prefixed asymmetric key material. This issue is fixed in version 1.9.0.

Affected packages

Ecosystem Package Introduced Fixed

Related vulnerabilities