CVE-2026-102271

PyJWT: Public keys in DER form are accepted as HMAC secrets, bypassing the CVE-2022-29217 guard

HIGH
7.4
CVSS Score
Published: September 28, 2026 at 08:31 PM UTC
Updated: October 6, 2026 at 06:36 PM UTC
2 products affected across 2 vendorsPyjwtPyjwt

Using pyjwt by jpadilla?

Get instant alerts when new vulnerabilities affect pyjwt - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.4
Exploit prediction
EPSS 0.2%
SSVC
PoC

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

2.4.0 ≤ v < 2.14.0
v < 2.14.0
Affected range stops below 2.14.0, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (3)

x_refsource_CONFIRMExploitPatchVendor Advisory
Source: cverecord
https://github.com/jpadilla/pyjwt/security/advisories/GHSA-p4g4-x82p-q773
x_refsource_MISCProductRelease Notes
Source: cverecord
https://github.com/jpadilla/pyjwt/releases/tag/2.14.0

SSVC — Action Prioritization

SSVCPoCNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7.4HIGHGitHub_M
Attack Vector
NETWORK
Complexity
HIGH
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
NONE
Vector?

Quick Info

StatusANALYZED
CWE
CWE-347

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card