Impact
Authlib versions 1.3.1 through 1.9.0 allow an unauthenticated attacker to forge HS256 JWTs by using a public key that contains a leading prefix such as whitespace, comments, or a byte‑order mark. The flaw arises because OctKey.import_key() only checks the very first byte of the key data for a marker, while the PEM loaders accept prefixed data. With this weakness an attacker who can obtain the public‑key bytes can reuse them as an HMAC secret, thereby forging tokens that assert arbitrary identities or permissions. The vulnerability bypasses the earlier remediation for CVE‑2024‑37568.
Affected Systems
The affected product is the Authlib Python library. All releases from 1.3.1 up to, but not including, 1.9.0 are vulnerable. Users employing Authlib for OAuth or OpenID Connect that configure JWT verification with PEM or certificate files containing prefixed key material are at risk.
Risk and Exploitability
The CVSS score of 7.4 indicates a high‑severity flaw. EPSS is not available, and the vulnerability is not listed as a Known Exploited Vulnerability by CISA, but the attack vector is inferred to be remote, via any service that uses Authlib to sign or verify tokens. Because the flaw requires no authentication to the target, and the attacker only needs to know the public‑key bytes, the risk of exploitation is considered significant for exposed services.
OpenCVE Enrichment
Github GHSA