CVE-2026-102271: CWE-347: Improper Verification of Cryptographic Signature in jpadilla pyjwt
PyJWT is a Python implementation of JSON Web Token standards. From 2.4.0 until 2.14.0, PyJWT HMACAlgorithm.prepare_key is affected because asymmetric-key guard relies on textual markers that are absent from DER encoding. This occurs when an application mixes HMAC and asymmetric algorithms and supplies a DER public key as the shared verification key. As a result, PyJWT uses public DER bytes as an HMAC secret. Consequently, an attacker who knows the public key can forge authenticated HMAC tokens. This issue is fixed in version 2.14.0.
AI Analysis
Technical Summary
CVE-2026-102271 describes an improper verification of cryptographic signature in PyJWT's HMACAlgorithm.prepare_key function affecting versions >=2.4.0 and <2.14.0. The flaw occurs because the asymmetric-key guard depends on textual markers not present in DER encoding. When an application mixes HMAC and asymmetric algorithms and supplies a DER public key as the shared verification key, PyJWT incorrectly uses the public DER bytes as an HMAC secret. This allows an attacker who knows the public key to forge authenticated HMAC tokens. The issue is resolved in PyJWT version 2.14.0.
Potential Impact
An attacker who knows the public key can forge authenticated HMAC tokens due to PyJWT treating the public DER bytes as an HMAC secret. This compromises the integrity and authenticity of tokens, potentially allowing unauthorized access or privilege escalation in applications relying on vulnerable PyJWT versions.
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-102271: CWE-347: Improper Verification of Cryptographic Signature in jpadilla pyjwt
Description
PyJWT is a Python implementation of JSON Web Token standards. From 2.4.0 until 2.14.0, PyJWT HMACAlgorithm.prepare_key is affected because asymmetric-key guard relies on textual markers that are absent from DER encoding. This occurs when an application mixes HMAC and asymmetric algorithms and supplies a DER public key as the shared verification key. As a result, PyJWT uses public DER bytes as an HMAC secret. Consequently, an attacker who knows the public key can forge authenticated HMAC 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
CVE-2026-102271 describes an improper verification of cryptographic signature in PyJWT's HMACAlgorithm.prepare_key function affecting versions >=2.4.0 and <2.14.0. The flaw occurs because the asymmetric-key guard depends on textual markers not present in DER encoding. When an application mixes HMAC and asymmetric algorithms and supplies a DER public key as the shared verification key, PyJWT incorrectly uses the public DER bytes as an HMAC secret. This allows an attacker who knows the public key to forge authenticated HMAC tokens. The issue is resolved in PyJWT version 2.14.0.
Potential Impact
An attacker who knows the public key can forge authenticated HMAC tokens due to PyJWT treating the public DER bytes as an HMAC secret. This compromises the integrity and authenticity of tokens, potentially allowing unauthorized access or privilege escalation in applications relying on vulnerable PyJWT versions.
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: 6abad294f7a7c541062fe5bf
Added to database: 09/28/2026, 20:48:20 UTC
Last enriched: 09/28/2026, 21:02:40 UTC
Last updated: 09/29/2026, 03:32:37 UTC
Views: 9
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.