Description
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.
Published: 2026-10-22
Score: 7.4 High
EPSS: < 1% Very Low
KEV: No
Impact: HMAC forgery leading to unauthorized token creation
Action: Patch
AI Analysis

Impact

Authlib versions 1.3.1 through 1.9.0 allow an unauthenticated attacker to forge HS256 JWTs by using a public key that contains a leading prefix such as whitespace, comments, or a byte‑order mark. The flaw arises because OctKey.import_key() only checks the very first byte of the key data for a marker, while the PEM loaders accept prefixed data. With this weakness an attacker who can obtain the public‑key bytes can reuse them as an HMAC secret, thereby forging tokens that assert arbitrary identities or permissions. The vulnerability bypasses the earlier remediation for CVE‑2024‑37568.

Affected Systems

The affected product is the Authlib Python library. All releases from 1.3.1 up to, but not including, 1.9.0 are vulnerable. Users employing Authlib for OAuth or OpenID Connect that configure JWT verification with PEM or certificate files containing prefixed key material are at risk.

Risk and Exploitability

The CVSS score of 7.4 indicates a high‑severity flaw. EPSS is not available, and the vulnerability is not listed as a Known Exploited Vulnerability by CISA, but the attack vector is inferred to be remote, via any service that uses Authlib to sign or verify tokens. Because the flaw requires no authentication to the target, and the attacker only needs to know the public‑key bytes, the risk of exploitation is considered significant for exposed services.

Generated by OpenCVE AI on October 23, 2026 at 03:08 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Authlib library to version 1.9.0 or later, which removes the unsafe key check and rejects prefixed key material.
  • Validate that all PEM or certificate inputs used for token verification contain no leading whitespace, comments, or byte‑order marks—clean or regenerate the key files if necessary.
  • If an immediate upgrade is not possible, restrict the use of the OctKey.import_key() path by disabling unsupported algorithms or switching to a signing method that does not rely on asymmetric key prefixes.

Generated by OpenCVE AI on October 23, 2026 at 03:08 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-7vr2-2fgp-9w7p Authlib incomplete algorithm-confusion fix permits HMAC forgery with prefixed public keys
History

Thu, 29 Oct 2026 15:00:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:authlib:authlib:*:*:*:*:*:*:*:*

Thu, 29 Oct 2026 03:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Fri, 23 Oct 2026 12:30:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Important


Fri, 23 Oct 2026 05:00:00 +0000

Type Values Removed Values Added
First Time appeared Authlib
Authlib authlib
Vendors & Products Authlib
Authlib authlib

Fri, 23 Oct 2026 00:45:00 +0000

Type Values Removed Values Added
Description 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.
Title Authlib incomplete algorithm-confusion fix permits HMAC forgery with prefixed public keys
Weaknesses CWE-184
CWE-347
References
Metrics cvssV3_1

{'score': 7.4, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-29T02:38:05.175Z

Reserved: 2026-10-21T20:34:25.600Z

Link: CVE-2026-114615

cve-icon Vulnrichment

Updated: 2026-10-29T02:37:58.132Z

cve-icon NVD

Status : Analyzed

Published: 2026-10-22T22:18:04.257

Modified: 2026-10-29T14:50:19.033

Link: CVE-2026-114615

cve-icon Redhat

Severity : Important

Publid Date: 2026-10-22T21:10:02Z

Links: CVE-2026-114615 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-23T04:45:13Z

Weaknesses
  • CWE-184

    Incomplete List of Disallowed Inputs

  • CWE-347

    Improper Verification of Cryptographic Signature