Zero Radar
← feed
HighVulnerabilityCVE-2026-114615updated 27 Oct 2026, 15:39 UTC

Authlib: attackers can forge login tokens when the public key has a stray leading character

A login-token library can be tricked into accepting a fake token signed with the server's own public key. An attacker who only knows that public key could create tokens claiming to be any user, including an admin.

Fixed in authlib 1.9.0Official, 2 sources
SeverityHighCVSS 7.4 of 10
Being exploited?UnclearNo reports either way yet
Fix available?Yesauthlib 1.9.0 · since 27 Oct 2026
How sure is this?Official, 2 sourcesBacked by an official source

How the attack works simplified

  1. 1Attacker has public keyPublic key is not secret
  2. 2Forged HS256 tokenPublic key bytes used as HMAC secret
  3. 3Authlib accepts tokenLeading byte bypasses the key-type check
  4. 4Attacker gains accessArbitrary claims accepted as genuine
  5. ResultAttacker impersonates any user

What happened

In Authlib 1.3.1 through 1.8.0, OctKey.import_key() only detects PEM public keys that begin at byte zero, while the PEM loaders accept leading whitespace, comments, or a byte-order mark. A public key with such a prefix is treated as an HMAC secret, enabling HS256 token forgery. This is a bypass of the fix for CVE-2024-37568.

Why it is dangerous: An unauthenticated attacker can forge tokens with arbitrary identity or authorization claims that the server accepts as genuine, leading to account takeover or privilege escalation. Services that verify tokens with Authlib's module-level jwt object and PEM or certificate keys stored with a leading space, newline, indentation, BOM, or comment are at risk.

Are you affected?

You are affected if you use Authlib 1.3.1 through 1.8.0 with the module-level jwt object and verify tokens using a PEM or certificate key whose text does not start at the first byte with "-----BEGIN".

Package / productAffected versionsFixed in
authlib · pip>= 1.3.1, <= 1.8.01.9.0

What to do

  1. Update authlib to 1.9.0 or later
  2. If you cannot update now, make sure PEM keys start exactly with "-----BEGIN" with no leading spaces, newlines, BOM, or comments
  3. Where possible, avoid the module-level jwt object and pin the allowed algorithms to asymmetric ones only

Timeline

  1. 22 Oct 2026, 22:18 UTC
    Publicly disclosed
  2. 22 Oct 2026, 22:18 UTC
    Reported by NVD · NVD
  3. 27 Oct 2026, 15:39 UTC
    GitHub Advisory reported on it · GitHub Advisory
  4. 27 Oct 2026, 15:39 UTC
    Fixed version published: authlib 1.9.0 · GitHub Advisory

Sources 2 reports, oldest first

Official vendor, government CERT or advisory database

Technical details

ID
CVE-2026-114615 · GHSA-7vr2-2fgp-9w7p
CVSS
7.4 / 10
EPSS
0.2% chance of exploitation within 30 days
Disclosed
22 Oct 2026, 22:18 UTC
On Zero Radar
before the radar started
Last change
27 Oct 2026, 15:39 UTC

The plain-language parts and the attack diagram were written by an AI model (anthropic/claude-haiku-5.5) from the sources above. Facts like versions, exploitation and dates come from the sources themselves. How Zero Radar works

Authlib: attackers can forge login tokens when the public key has a stray leading character · Zero Radar