Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain target's public JWK
-
DeliveryPrepend UTF-8 BOM to JWK JSON
-
ExploitSign HS256 token with public key as HMAC secret
-
ExecutionSubmit forged token to mixed-algorithm verify path
-
ImpactAuthenticate as arbitrary principal
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A04:2025 - Cryptographic Failures
ASVS 5.0
V11 - Cryptography Signature verification
|
| Exploitation Conditions | Exploitation requires all of: the application runs PyJWT 2.13.0 through 2.13.x (fixed in 2.14.0); a mixed-algorithm verification path that permits HMAC (e.g., HS256) alongside asymmetric algorithms; the application passing an asymmetric PUBLIC JWK directly as the raw key argument to HMACAlgorithm.prepare_key rather than loading it via PyJWK/HMACAlgorithm.from_jwk; and the public JWK being prefixed with a UTF-8 byte-order mark (or otherwise BOM/encoding-mangled) so the raw-JWK detector fails to identify it as JSON. The attacker must also know the public key (normally published, so a weak barrier). Limiting factors: this raw-JWK-as-HMAC-secret pattern is a specific and non-default coding choice, which is why the vendor assigned AC:H; correctly-written applications that load JWKs through the provided helpers are not exposed. |
| Impact | This is a real but conditionally-scoped algorithm-confusion flaw in PyJWT, a ubiquitous Python JWT library. The vendor CVSS 3.1 vector (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N, 7.4 High) correctly captures the shape: network-reachable, no authentication needed by the attacker, but high attack complexity because exploitation depends on a specific and non-default application architecture (mixing HMAC and asymmetric algorithms and feeding a raw public JWK to HMACAlgorithm.prepare_key). All three exploitation signals point AWAY from mass exploitation: no EPSS score is provided, the CVE is NOT in CISA KEV, and no standalone POC is referenced - the only public code is the fix commit and its regression tests (which demonstrate the trigger conditions but are not a weaponized exploit). This is therefore a credible integrity/authentication-bypass defect (token forgery) rather than an actively-exploited priority; the narrow triggering configuration keeps real-world risk LOW-to-MEDIUM despite the product's enormous footprint. One labeling nuance: the CWE (CWE-347, Improper Verification of Cryptographic Signature) and the confidentiality-heavy C:H are debatable - the true primary impact is signature forgery / authentication bypass (integrity), consistent with its sibling PyJWT advisories in the same 2.14.0 release. |
| Exploit ScenarioDerived | An application verifies JWTs in a mixed-algorithm configuration and, due to a coding pattern, passes an asymmetric public JWK directly as the raw key to the HMAC path. An attacker who already knows the (public, therefore non-secret) key prefixes the JWK JSON with a UTF-8 byte-order mark so PyJWT's raw-JWK detector fails to recognize it as JSON, causing the public key bytes to be used as the HS256 HMAC secret; the attacker then signs a forged token with those known bytes and is authenticated as any user. No public exploit code is identified at time of analysis - only the vendor's fix commit and regression tests exist. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 28, 2026
Token forgery in PyJWT 2.13.x lets unauthenticated remote attackers mint tokens that the library will accept as authentic: when a public JWK is prefixed with a UTF-8 byte-order mark and passed directly as the raw HMAC secret inside a mixed-algorithm verification path, HMACAlgorithm.prepare_key fails to recognize the material as an asymmetric key and uses the publicly known JWK bytes as the shared secret, so anyone who knows the public key can sign arbitrary claims that verify successfully. The flaw carries an assessed CVSS of 7.4 (integrity-only impact, AC:H, PR:N) and per our independent assessment is conditionally scoped: it requires PyJWT 2.13.0 through 2.13.x, an application that permits HMAC alongside asymmetric algorithms, code that hands a raw public JWK to prepare_key instead of loading it via PyJWK/HMACAlgorithm.from_jwk, and BOM-prefixed key material. No public exploit code was identified at time of analysis and the issue is not in CISA KEV; the vendor-released patch is 2.14.0.
RemediationAI
Vendor-released patch: upgrade PyJWT to 2.14.0, the version in which HMACAlgorithm.prepare_key normalizes BOM-prefixed and deeply nested key material before the raw-JWK check; the fix is visible in commit 180783930de91876bc0d601f826a1f2956057291 and the release at https://github.com/jpadilla/pyjwt/releases/tag/2.14.0, with details in advisory GHSA-r6x4-923q-g947. If an immediate upgrade is not possible, the most effective compensating controls are architectural: stop passing raw JWK strings as the key argument and instead load asymmetric keys exclusively through PyJWK or HMACAlgorithm.from_jwk, which perform the correct key-type handling - applications written this way are not exposed; and pin jwt.decode to a single expected algorithm (or a fixed asymmetric-only list) rather than allowing HMAC alongside RSA/EC, which removes the confusion primitive entirely. The trade-off of algorithm pinning is reduced flexibility for multi-issuer deployments that legitimately serve both symmetric and asymmetric tokens, in which case route those issuers through separate verifiers with per-issuer key loaders. As defense in depth, reject or strip BOM-prefixed key material at the configuration boundary and validate that configured secrets are not themselves JSON documents, though note that input sanitization alone is weaker than upgrading because the underlying detection gap remains. Monitor for forged tokens by alerting on HS256 tokens arriving at endpoints that should only accept RS256/ES256, and rotate any HMAC secrets that may have been derived from a public JWK.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
PyJWT's HMACAlgorithm.prepare_key contains a heuristic that inspects raw key material and rejects anything that looks like a JSON Web Key, because treating an attacker-supplied or public JWK as an HMAC secret is the classic JWT algorithm-confusion attack. The root cause is CWE-347 (Improper Verification of Cryptographic Signature): the detector relied on a simple leading-'{' JSON check that did not account for Unicode byte-order marks or other encoding-mangled input, and it also failed when the decoder raised RecursionError on deeply nested JSON. A key such as a UTF-8 BOM followed by a public RSA JWK therefore slipped past the check, was accepted as an ordinary HMAC secret, and the token was verified under HS256 using that public value - a key the attacker already possesses. The upstream fix in commit 180783930de91876bc0d601f826a1f2956057291 adds a RecursionError fallback that re-decodes the key with json.detect_encoding (which strips/normalizes BOMs) using errors='surrogatepass', then strips leading whitespace before testing for '{', raising InvalidKeyError if the material still looks like a JWK. The accompanying tests parametrize across utf-8, utf-8-sig, utf-16/utf-32 variants and deep nested structures to confirm the detector is no longer bypassable. Because the attack only requires the public key - normally published in a JWKS endpoint - the confidentiality impact is nil while token integrity, and hence authentication and authorization decisions built on those tokens, is fully compromised.
Know when Pyjwt gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Attacker needs no auth (PR:N) but a specific mixed-algo/raw-JWK config plus BOM manipulation (AC:H); primary impact is token forgery/auth-bypass so I:H, C:N/A:N.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
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.
Blast Radius
ecosystem impact- 196 pypi packages depend on pyjwt (134 direct, 63 indirect)
Ecosystem-wide dependent count for version 2.13.0.
Articles & Coverage 1
Technical POC Analysis
CWE-347 (Improper Verification of Cryptographic Signature; the advisory was initially filed as CWE-327 and reclassified on 2026-09-10).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
PyJWT 2.13.x token forgery vulnerability could allow unauthenticated attackers to mint valid tokens under specific conditions. No public exploit identified at time of analysis, but organizations using affected versions in mixed-algorithm verification paths face potential integrity compromise. Leadership should prioritize identifying and patching vulnerable applications to prevent unauthorized access.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Forged HS256 JSON Web Tokens can be accepted as authentic by PyJWT (pip package PyJWT) versions 2.13.0 through 2.13.x wh
Improper validation in PyJWT 2.1.0 through 2.14.0 allows an attacker who already holds a stolen sender-constrained (DPoP
Denial of service in PyJWT 2.9.0 through 2.13.0: a single malformed RSA JWK embedded in a JWK Set aborts construction of
Unauthenticated denial of service in the PyJWT Python library (versions 2.0.0a1 through 2.14.0) allows a remote attacker
pyjwt is a JSON Web Token implementation in Python. Rated high severity (CVSS 7.5), this vulnerability is remotely explo
Authentication bypass in PyJWT versions prior to 2.13.0 allows remote attackers to forge valid JSON Web Tokens by exploi
Reuse of a caller-supplied options mapping in PyJWT 2.11.0 through 2.13.0 can silently leave registered-claim verificati
Malformed JSON Web Token headers can cause an uncaught RecursionError in PyJWT 2.13.0 through versions before 2.14.0, re
Uncontrolled resource consumption in PyJWT 2.8.0-2.12.1 exposes any service that verifies detached JWS tokens to unauthe
Signature forgery in PyJWT before 2.14.0 allows an attacker who knows a target's asymmetric public key to forge HMAC-aut
JWKS trust-boundary bypass in PyJWT's PyJWKClient allows a configured trusted JWKS endpoint that returns an HTTP 3xx red
Unconstrained outbound JWKS requests in PyJWT's PyJWKClient.get_signing_key() allow unauthenticated remote attackers to
Same technique Authentication Bypass
View allVendor StatusVendor
SUSE
Severity: Important| Product | Status |
|---|---|
| SUSE Linux Enterprise Desktop 15 SP7 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 12 | Not-Affected |
| SUSE Linux Enterprise Micro 5.5 | Not-Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP7 | Not-Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP7 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP7 | Not-Affected |
| SUSE Linux Enterprise Server 16.0 | Not-Affected |
| SUSE Linux Enterprise Server 16.1 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Not-Affected |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Not-Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Not-Affected |
| SUSE Linux Micro 6.0 | Not-Affected |
| SUSE Linux Micro 6.1 | Not-Affected |
| SUSE Linux Micro 6.2 | Not-Affected |
| openSUSE Leap 16.0 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Not-Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP5 | Not-Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP6 | Not-Affected |
| SUSE Linux Enterprise Module for Public Cloud 12 | Not-Affected |
| SUSE Linux Enterprise Module for Public Cloud 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP5 | Not-Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP6 | Not-Affected |
| SUSE Linux Enterprise Server 12 SP5 | Not-Affected |
| SUSE Linux Enterprise Server 12 SP5-LTSS | Not-Affected |
| SUSE Linux Enterprise Server 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Not-Affected |
| SUSE Linux Enterprise Server 15 SP5 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Not-Affected |
| SUSE Linux Enterprise Server 15 SP6 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Not-Affected |
| SUSE Linux Enterprise Server LTSS Extended Security 12 SP5 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 12 SP5 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Not-Affected |
| SUSE CaaS Platform 3.0 | Not-Affected |
| SUSE CaaS Platform 4.0 | Not-Affected |
| SUSE Enterprise Storage 6 | Not-Affected |
| SUSE Enterprise Storage 7 | Not-Affected |
| SUSE Enterprise Storage 7.1 | Not-Affected |
| SUSE Linux Enterprise Desktop 15 SP1 | Not-Affected |
| SUSE Linux Enterprise Desktop 15 SP2 | Not-Affected |
| SUSE Linux Enterprise Desktop 15 SP3 | Not-Affected |
| SUSE Linux Enterprise Desktop 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Desktop 15 SP5 | Not-Affected |
| SUSE Linux Enterprise Desktop 15 SP6 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP1 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP1-ESPOS | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP1-LTSS | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP2 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP2-ESPOS | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP2-LTSS | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP3 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP3-ESPOS | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP3-LTSS | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Not-Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP1 | Not-Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP2 | Not-Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP3 | Not-Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP1 | Not-Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP2 | Not-Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP3 | Not-Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Not-Affected |
| SUSE Linux Enterprise Module for Public Cloud 15 SP1 | Not-Affected |
| SUSE Linux Enterprise Module for Public Cloud 15 SP2 | Not-Affected |
| SUSE Linux Enterprise Real Time 15 SP2 | Not-Affected |
| SUSE Linux Enterprise Real Time 15 SP3 | Not-Affected |
| SUSE Linux Enterprise Real Time 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Server 12 | Not-Affected |
| SUSE Linux Enterprise Server 12 SP3 | Not-Affected |
| SUSE Linux Enterprise Server 12 SP4 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP1 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP1-BCL | Not-Affected |
| SUSE Linux Enterprise Server 15 SP1-LTSS | Not-Affected |
| SUSE Linux Enterprise Server 15 SP2 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP2-BCL | Not-Affected |
| SUSE Linux Enterprise Server 15 SP2-LTSS | Not-Affected |
| SUSE Linux Enterprise Server 15 SP3 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP3-BCL | Not-Affected |
| SUSE Linux Enterprise Server 15 SP3-LTSS | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 12 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 12 SP3 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 12 SP4 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP1 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP2 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP3 | Not-Affected |
| SUSE Manager Proxy 4.0 | Not-Affected |
| SUSE Manager Proxy 4.1 | Not-Affected |
| SUSE Manager Proxy 4.2 | Not-Affected |
| SUSE Manager Proxy 4.3 | Not-Affected |
| SUSE Manager Proxy LTS 4.3 | Not-Affected |
| SUSE Manager Retail Branch Server 4.0 | Not-Affected |
| SUSE Manager Retail Branch Server 4.1 | Not-Affected |
| SUSE Manager Retail Branch Server 4.2 | Not-Affected |
| SUSE Manager Retail Branch Server 4.3 | Not-Affected |
| SUSE Manager Retail Branch Server LTS 4.3 | Not-Affected |
| SUSE Manager Server 3.2 | Not-Affected |
| SUSE Manager Server 4.0 | Not-Affected |
| SUSE Manager Server 4.1 | Not-Affected |
| SUSE Manager Server 4.2 | Not-Affected |
| SUSE Manager Server 4.3 | Not-Affected |
| SUSE Manager Server LTS 4.3 | Not-Affected |
| SUSE OpenStack Cloud 7 | Not-Affected |
| openSUSE Leap 15.3 | Not-Affected |
| openSUSE Leap 15.4 | Not-Affected |
| openSUSE Leap 15.5 | Not-Affected |
| openSUSE Leap 15.6 | Not-Affected |
EUVD-2026-88540
GHSA-r6x4-923q-g947
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB