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

Published Oct 22, 2026
·
Updated

Authlib is a Python library which builds OAuth and OpenID Connect servers. From 1.3.1 until 1.9.0, OctKey.importkey() 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.importkey() in authlib/jose/rfc7518/octkey.py, where POSSIBLEUNSAFEKEYS fails to identify prefixed asymmetric key material. This issue is fixed in version 1.9.0.

Affected Software

1 affected component
pypi/authlib>=1.3.1<1.9.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Authlib to a version that resolves this vulnerability.

    Fixed in 1.9.0

Event History

Oct 22, 2026
CVE Published
via MITRE·09:10 PM
Data Sourced
via MITRE·09:10 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed to token forgery?

Exposure requires Authlib versions from 1.3.1 until 1.9.0, use of the documented mixed algorithm registry, and verification configured with PEM or certificate bytes that have leading whitespace, comments, or a byte-order mark. An attacker must also know the same public-key bytes.

2

Does an attacker need an account or user interaction to exploit this?

No. The issue is exploitable remotely without privileges or user interaction when the affected key and algorithm configuration is present.

3

What can an attacker do if exploitation succeeds?

An attacker can forge HS256 tokens using the prefixed public-key material as an HMAC secret. The forged tokens can contain arbitrary identity or authorization claims.

4

What should be done if upgrading is not immediately possible?

The provided data identifies the risky condition as a mixed algorithm registry combined with PEM or certificate verification bytes carrying a leading prefix. Removing that configuration condition can reduce exposure until upgrading to version 1.9.0.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203