CVE-2026-102272: CWE-347: Improper Verification of Cryptographic Signature in jpadilla pyjwt
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.
AI Analysis
Technical Summary
PyJWT, a Python library implementing JSON Web Token standards, has a cryptographic signature verification flaw (CWE-347) in versions >=2.13.0 <2.14.0. The vulnerability occurs in the HMACAlgorithm.prepare_key function where the raw-JWK detector fails to normalize UTF-8 byte-order marks before JSON validation. This allows a public JWK prefixed with a BOM to be misclassified as an HMAC secret in mixed-algorithm verification paths, enabling attackers with knowledge of the public key to forge tokens. The issue is resolved in version 2.14.0.
Potential Impact
An attacker who knows the public key can exploit this vulnerability to forge authenticated JSON Web Tokens, potentially bypassing authentication or authorization controls. The flaw compromises the integrity and authenticity of tokens verified using the affected versions of PyJWT, leading to high impact on confidentiality and integrity.
Mitigation Recommendations
Upgrade PyJWT to version 2.14.0 or later, where this vulnerability is fixed. No other mitigations are indicated by the vendor advisory.
CVE-2026-102272: CWE-347: Improper Verification of Cryptographic Signature in jpadilla pyjwt
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 v3.1
Score 7.4high
Affected software
jpadilla
pyjwt
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
PyJWT, a Python library implementing JSON Web Token standards, has a cryptographic signature verification flaw (CWE-347) in versions >=2.13.0 <2.14.0. The vulnerability occurs in the HMACAlgorithm.prepare_key function where the raw-JWK detector fails to normalize UTF-8 byte-order marks before JSON validation. This allows a public JWK prefixed with a BOM to be misclassified as an HMAC secret in mixed-algorithm verification paths, enabling attackers with knowledge of the public key to forge tokens. The issue is resolved in version 2.14.0.
Potential Impact
An attacker who knows the public key can exploit this vulnerability to forge authenticated JSON Web Tokens, potentially bypassing authentication or authorization controls. The flaw compromises the integrity and authenticity of tokens verified using the affected versions of PyJWT, leading to high impact on confidentiality and integrity.
Mitigation Recommendations
Upgrade PyJWT to version 2.14.0 or later, where this vulnerability is fixed. No other mitigations are indicated by the vendor advisory.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-09-28T20:11:16.658Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6abad292f7a7c541062fe5b2
Added to database: 09/28/2026, 20:48:18 UTC
Last enriched: 09/28/2026, 21:02:53 UTC
Last updated: 09/29/2026, 02:48:35 UTC
Views: 7
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.