Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. authlib
  4. ›
  5. CVE-2026-114615

CVE-2026-114615: Authlib incomplete algorithm-confusion fix permits HMAC forgery with prefixed public keys

October 27, 2026

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: prevent OctKey to import ssh/rsa/pem keys”, referencing issue #654), and the original attack works again unchanged whenever the stored PEM does not start at offset 0.

Reproduced end-to-end on 1.8.0, the newest release (published 2026-08-30), and on origin/main (c529a61), with cryptography 50.0.2.

References

  • github.com/advisories/GHSA-7vr2-2fgp-9w7p
  • github.com/authlib/authlib/commit/e3bd41cb29dcfee434453b135ffb487884baeedf
  • github.com/authlib/authlib/pull/945
  • github.com/authlib/authlib/releases/tag/v1.9.0
  • github.com/authlib/authlib/security/advisories/GHSA-7vr2-2fgp-9w7p
  • nvd.nist.gov/vuln/detail/CVE-2026-114615

Code Behaviors & Features

Detect and mitigate CVE-2026-114615 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 1.3.1 before 1.9.0

Fixed versions

  • 1.9.0

Solution

Upgrade to version 1.9.0 or above.

Impact 7.4 HIGH

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-184: Incomplete List of Disallowed Inputs
  • CWE-347: Improper Verification of Cryptographic Signature

Source file

pypi/authlib/CVE-2026-114615.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:21 +0000.