---
id: "CVE-2026-114615"
kind: "vulnerability"
aliases: ["CVE-2026-114615"]
title: "Authlib: prefixed public keys let attackers forge HS256 login tokens"
severity: "high"
cvss: 7.4
epss: 0.00127
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["authlib", "jwt", "oauth", "openid-connect", "package", "python"]
not_affected_if: ["no-mixed-algorithm-registry", "plain-key-verification", "version-outside-1.3.1-to-1.9.0"]
published_at: "2026-10-22T22:18:04+00:00"
first_seen_at: "2026-10-23T21:57:32+00:00"
updated_at: "2026-10-25T03:25:39+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-114615", "first_seen_at": "2026-10-23T21:57:32+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-114615", "first_seen_at": "2026-10-24T07:15:51+00:00"}]
---

# Authlib: prefixed public keys let attackers forge HS256 login tokens

Authlib's OctKey.import_key() only detects asymmetric key markers at byte zero, but its PEM loaders accept leading whitespace, comments, or a byte-order mark. An unauthenticated attacker who knows the public-key bytes a server uses for verification can use them as an HMAC secret and forge HS256 tokens with arbitrary identity or authorization claims.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `pip show authlib` and confirm the installed version is between `1.3.1` and `1.9.0`.
- Check whether the application uses the mixed algorithm registry and configures token verification with PEM or certificate bytes that may begin with whitespace, a comment, or a byte-order mark.

## Fix

- Upgrade Authlib to `1.9.0` or later.

## Timeline

- 2026-10-23T21:57:32+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-114615
- 2026-10-24T07:15:51+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-114615

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
