All vulnerabilities

PyPI

CVE-2026-114615

Authlib incomplete algorithm-confusion fix permits HMAC forgery with prefixed public keys

Severity
High 7.4
Published
27 Oct 2026
Last changed
30 Oct 2026
Added to UpHeron
23 Nov 2026
Fixed in
1.9.0
Exploit chance
0.2% in the next 30 daysHigher than 11% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Incomplete deny list (CWE-184)Improper verification of a cryptographic signature (CWE-347)
Attack
Over the network · Only under certain conditions · No login needed · No user action needed
Attacker can
Read data · Change data
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Also known as
GHSA-7vr2-2fgp-9w7p, PYSEC-2026-4355
Sources
OSV.dev and GitHub

Description

OctKey.import_key() carries the only guard that stops an asymmetric public key from being used as an HMAC secret in authlib.jose. That guard is raw_key.startswith(POSSIBLE_UNSAFE_KEYS) — anchored at byte 0 — while the loader that consumes the identical bytes on the asymmetric path (cryptography.hazmat.primitives.serialization.load_pem_public_key / load_pem_x509_certificate) skips anything before the -----BEGIN line. A PEM public key or X.509 certificate carrying one leading byte — a newline, a space, four spaces of indentation, a UTF-8 BOM, or a comment line — is therefore not recognised, falls through, and becomes the HMAC secret. An attacker holding only the issuer's public key then mints an HS256 token with arbitrary claims that jwt.decode() accepts as authentic.

This is an incomplete fix of CVE-2024-37568 / GHSA-5357-c2jx-v7qh. That advisory's fix is exactly this guard (git log -S 'POSSIBLE_UNSAFE_KEYS' -- authlib/jose/rfc7518/oct_key.py returns a single commit, 3bea812 "fix:…

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
authlibPyPI · osv:PyPI:authlib
  • From 1.3.1 before 1.9.0

About authlib

Weekly downloads (PyPI)
38,222,635PyPI Stats, 23 Nov 2026

References