Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain target's public JWK / JWKS
-
DeliveryCraft HS256 token with forged claims
-
ExploitSign using public key as HMAC secret
-
ExecutionSubmit token to verification endpoint
-
PersistGuard misses container form, HMAC verify passes
-
ImpactAuthenticate as arbitrary/privileged identity
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A04:2025 - Cryptographic Failures
ASVS 5.0
V11 - Cryptography Signature verification
|
| Exploitation Conditions | Exploitation requires a specific, non-default application design: the app must (1) be running PyJWT 2.13.0, (2) permit both HMAC (e.g. HS256) and asymmetric (RS256/ES256) algorithms in its verification allow-list, and (3) pass a PUBLIC JWK CONTAINER - a JWKS document ({"keys":[...]}), a bare array ([jwk]), a nested array ([[jwk]]), or a BOM-prefixed variant - directly as the raw key to verification, rather than an individual key object. The attacker must also know the target's public key (usually not secret). Limiting factors: the 2.13.0 guard already blocks top-level JWK forms, so only the container wrappers slip through; applications that decode with a single algorithm, use PyJWK/PyJWKClient objects, or supply proper symmetric secrets are unaffected. AC:H reflects these combined preconditions; no user interaction or authentication is needed for the attacker. |
| Impact | This is a genuine authentication-bypass / signature-forgery flaw (CWE-347) but with a narrow trigger, so it sits below its 7.4 headline score in real-world urgency. The CVSS vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N is internally consistent with the description: no privileges are needed to forge a token, but AC:H correctly reflects the multiple preconditions (the application must be configured to accept both HMAC and asymmetric algorithms AND must pass a public JWK container directly as the raw verification key, and the attacker must know the public key). There is no EPSS score, no CISA KEV listing, and no public exploit code identified in the provided intelligence - so no signal indicates active or automatable exploitation; this is a code-audited advisory-and-commit disclosure, not an observed-in-the-wild threat. The commit and dedicated regression tests (JWKS wrappers, nested arrays, BOM prefix, oversized-integer/deep-array cases) confirm the root cause with high fidelity. Bottom line: real and worth patching for anyone on the affected release, but a targeted design-dependent bug rather than a broadly exploitable one. |
| Exploit ScenarioDerived | An application on PyJWT 2.13.0 configures verification to allow both HMAC and RSA/EC algorithms and passes a public JWK container (e.g. a JWKS document {"keys":[...]} or a bare/nested array wrapping a public JWK) as the raw key. Because the 2.13.0 public-key guard only inspected top-level JWK forms, the public key material is accepted as an HMAC secret; an attacker who knows that public key crafts an HS256 token signed with it and injects arbitrary authenticated claims (identity/role). No exploit code is published, and exploitation complexity is high (AC:H) given the specific configuration required. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 28, 2026
Signature forgery in PyJWT 2.13.0 lets an attacker forge arbitrary JWT claims when an application verifies tokens using both HMAC and asymmetric algorithms and hands a public JWK container (a JWKS document, a bare array, a nested array, or a BOM-prefixed variant) directly to the library as the raw key. Because the version 2.13.0 HMAC key guard only recognizes top-level public JWK objects and misses these container wrappers, public asymmetric key material - which is not secret - is accepted as the HMAC secret, so anyone who knows the target's public key can sign a token with any claims and have it validate. The flaw is an improper-signature-verification issue (CWE-347) rated CVSS 3.1 7.4 (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N) and unauthenticated in the sense that no credentials are needed, but real-world urgency is lower than the headline score: exploitation requires a non-default application design that mixes algorithm families and passes container-form keys, and no public exploit code or confirmed active exploitation was identified at time of analysis. Vendor-released patch: PyJWT 2.14.0.
RemediationAI
Upgrade PyJWT to version 2.14.0 or later - the only vendor-released fix, addressed by commit 801cd128528c62d9b23fcd161d1a2e1c17982f95 and published as release 2.14.0 - using pip install --upgrade 'pyjwt>=2.14.0' and pinning the floor in requirements.txt/pyproject.toml (also verify transitive dependents such as auth SDKs and API gateways do not hold the library back); see the advisory at https://github.com/jpadilla/pyjwt/security/advisories/GHSA-w2cx-738m-mc7w. Where immediate upgrade is not possible, the most effective compensating control is to never allow algorithm mixing: pass an explicit single-family allow-list to jwt.decode, for example algorithms=["RS256"] or algorithms=["HS256"], which removes the confusion path entirely and is safe because legitimate tokens from a given issuer use one family, though it will break any legacy flow that expects multiple algorithms from the same verifier and may require per-issuer decoding rules. Second, stop passing raw JWK containers as keys: resolve keys through PyJWK/PyJWKClient and pass the individual key object, or fetch and index the JWKS document yourself and select the matching "kid", which keeps key material in the intended form (minor refactor, no functional loss). Third, for HMAC verifiers, supply the actual shared symmetric secret rather than any JSON blob. Note that patched versions also reject JWK-shaped strings that are legitimate deep-array secrets only when a "kty" member is present, so testing after upgrade is advised for unusual key formats; no KEV or public exploit code was identified, so these changes can be scheduled as a normal high-priority maintenance item rather than an emergency, but they should not be deferred given the authentication-bypass nature of the flaw.
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 is a Python implementation of JSON Web Token (JWT) standards, and the vulnerable code lives in HMACAlgorithm.prepare_key within jwt/algorithms.py. JSON Web Keys (JWKs) are dictionaries carrying a "kty" (key type) member, and JWKS documents wrap one or more JWKs in a {"keys": [...]} container; applications commonly fetch such documents from a provider's JWKS endpoint and may inadvertently pass the whole container as the signing/verification key. Prior hardening in 2.13.0 only rejected keys that were themselves top-level JWK objects (a JSON object with a "kty" member), so an attacker-supplied or application-supplied container such as {"keys":[public_jwk]}, [public_jwk], [[public_jwk]], or a UTF-8-BOM-prefixed JWKS slipped past the guard and was treated as raw HMAC key bytes. This is the classic algorithm-confusion (key-confusion) attack: when a verifier's allow-list contains both HS* and RS*/ES*/PS* algorithms, an attacker sets the token header to HS256 and signs it with the target's public key, which the library then uses as the symmetric secret. The upstream fix (commit 801cd128528c62d9b23fcd161d1a2e1c17982f95) makes detection recursive, walking nested dicts and lists for a "kty" member via an iterative stack, strips leading BOM and whitespace before the structural check, scans the raw text for a "kty" member even inside arrays by tokenizing quoted strings followed by a colon, and adds json.loads(..., parse_int=lambda _: 0) to neutralize oversized-integer denial-of-service inputs. The accompanying tests cover jwks, array, nested-array, BOM-prefixed, 20,000-level-deep array, escaped-\u006bty, oversized-integer, and a legitimate deep-array secret containing the literal string "kty" that must still be accepted.
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
AC:H because exploitation needs a specific HMAC+asymmetric config passing a JWK container as raw key; PR:N/UI:N since forging a token needs only the public key; C:H/I:H from full claim forgery.
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, PyJWT HMACAlgorithm.prepare_key is affected because HMAC key guard only recognizes top-level public JWK forms and misses container representations. This occurs when an application allows HMAC and asymmetric algorithms and passes a public JWK container as the raw key. As a result, public asymmetric key material is accepted as the HMAC secret. Consequently, an attacker who knows the public key can forge a token with arbitrary authenticated claims. 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 a cryptographic signature.
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.0, a widely used Python library for validating JSON Web Tokens, contains a signature-forgery flaw that lets an attacker mint tokens with arbitrary claims using only an application's public key. Any service that authenticates users or workloads via PyJWT and mixes HMAC with asymmetric algorithms while passing a JWKS container directly to the library is exposed to authentication and privilege-escalation bypass. No vendor patch is currently available and no public exploit code has been identified at time of analysis, so exposure is confined to organizations whose token-validation code follows that non-default pattern.
No vendor-released patch identified at time of analysis. Interim mitigations: never pass a JWKS document, bare JWK array, nested array, or BOM-prefixed variant as the raw key to PyJWT; resolve keys via PyJWKClient/PyJWKSet and supply a single key object; set the algorithms parameter to exactly one expected algorithm and reject tokens whose header alg does not match; keep HMAC secrets and asymmetric public keys in separate code paths and configuration so public key material can never be used as an HMAC secret; validate that the resolved key type and family match the expected algorithm; strip BOM and whitespace before parsing; and alert on anomalous signature-verification failures and on tokens signed with an unexpected algorithm. Vulnerability is unauthenticated per the CVSS vector (PR:N); exploitation requires a non-default application design that mixes algorithm families and passes container-form keys, and no public exploit identified at time of analysis.
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-88541
GHSA-w2cx-738m-mc7w
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB