CVE-2026-102272
Received Received - Intake

HMAC Key Confusion in PyJWT via BOM Prefix

Vulnerability report for CVE-2026-102272, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-09-28

Last updated on: 2026-09-28

Assigner: GitHub, Inc.

Description

PyJWT is a Python implementation of JSON Web Token standards. From 2.13.0 until 2.14.0, HMACAlgorithm.prepare_key in jwt/algorithms.py is affected because raw-JWK detector does not normalize accepted Unicode byte-order marks before checking for JSON. This occurs when a public JWK is prefixed with a UTF-8 BOM and used in a mixed-algorithm verification path. As a result, public JWK bypasses asymmetric-key detection and becomes the HMAC secret. Consequently, an attacker who knows the public key can forge authenticated tokens. This issue is fixed in version 2.14.0.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-09-28
Last Modified
2026-09-28
Generated
2026-09-29
AI Q&A
2026-09-29
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
pyjwt pyjwt to 2.14.0 (inc)
pyjwt pyjwt 2.14.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-347 The product does not verify, or incorrectly verifies, the cryptographic signature for data.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

PyJWT versions 2.13.0 to 2.14.0 have a flaw in HMACAlgorithm.prepare_key where raw-JWK detection fails to normalize Unicode byte-order marks. This allows a public JWK prefixed with a UTF-8 BOM to bypass asymmetric-key checks and be treated as an HMAC secret. Attackers can exploit this to forge authenticated tokens if they know the public key.

Detection Guidance

Detecting this vulnerability requires checking the PyJWT version in use. Run 'pip show PyJWT' or 'pip list | grep PyJWT' to verify if the installed version is between 2.13.0 and 2.14.0. If so, the system is vulnerable.

Impact Analysis

If you use PyJWT in versions 2.13.0 to 2.14.0 and verify tokens with mixed algorithms, an attacker could forge tokens using a known public key. This could allow unauthorized access to systems relying on JWT authentication.

Compliance Impact

This vulnerability could lead to unauthorized data access or modification, violating confidentiality and integrity requirements in GDPR and HIPAA. Organizations using affected PyJWT versions may fail compliance audits if token forgery risks are not mitigated.

Mitigation Strategies

Upgrade PyJWT to version 2.14.0 or later immediately using 'pip install --upgrade PyJWT'. If upgrading is not possible, avoid using public JWKs with UTF-8 BOM prefixes in mixed-algorithm verification paths.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-102272. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart