Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain target's public key (DER)
-
DeliveryCraft HS256 token signed with DER bytes as HMAC secret
-
ExploitSubmit forged token to endpoint accepting mixed algorithms
-
Executionprepare_key uses public DER as HMAC key, signature verifies
-
ImpactImpersonate user / bypass authentication
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: (1) the application configures PyJWT to accept BOTH HMAC and asymmetric algorithms (the classic algorithm-confusion precondition); (2) the application supplies a DER-encoded public key (SubjectPublicKeyInfo, PKCS1, or a DER x509 certificate) as the shared verification key rather than a PEM/SSH-formatted key - PEM and SSH keys were already caught by the pre-existing textual guard; and (3) the attacker knows the public key (which, being public, is a low bar). Affected versions are PyJWT 2.4.0 through 2.13.x (fixed in 2.14.0), and the 'cryptography' backend must be installed (has_crypto) for the DER path. Limiting factors: this is a non-default, application-specific misconfiguration - apps that pin a single algorithm or that pass PEM keys are not exploitable - which is why AC is High despite no authentication or user interaction being required. |
| Impact | This is a genuine but conditionally-triggered signature-forgery / algorithm-confusion flaw (CWE-347), not a high-CVSS-but-low-impact issue in the abstract - yet its real-world reachability is narrow. The vendor CVSS 3.1 vector (AV:N/AC:H/PR:N/UI:N/C:H/I:H/A:N, 7.4) correctly captures the key trade-off: network-reachable and unauthenticated (PR:N) because an attacker who knows the public key can forge tokens, but AC:H because exploitation depends on a specific application misconfiguration - the app must mix HMAC and asymmetric algorithms AND supply a DER-encoded public key as the shared verification secret. There is no EPSS score, no CISA KEV listing, and no public exploit code provided, so exploitation status is 'no public exploit identified at time of analysis' - this is a design/logic weakness disclosed with a fix, not an actively-exploited threat. The signals are consistent (no conflict): moderate severity, ubiquitous library, but a non-default trigger condition. Note the input tag 'Information Disclosure' conflicts with the actual impact - this is token forgery / authentication bypass (integrity), not information disclosure. This is the DER-encoding counterpart of the sibling PEM-marker flaw (GHSA-ffc3-869f-jxw9); both stem from HMACAlgorithm.prepare_key's asymmetric-key guard relying on textual key markers. |
| Exploit ScenarioDerived | An application configured to accept both HMAC (HS256) and asymmetric (RS256) algorithms loads an RSA public key in DER form and passes those raw bytes as the verification key. Because PyJWT's textual PEM/SSH marker check does not detect DER encoding, PyJWT treats the public DER bytes as an HMAC secret; an attacker who already knows the (public) key crafts an HS256 token signed with those same bytes and it verifies as authentic, forging arbitrary authenticated claims. No public proof-of-concept was provided, though the fix commit ships regression tests demonstrating the rejected DER key/certificate cases. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 28, 2026
Signature forgery in the PyJWT Python library (versions 2.4.0 through 2.13.x) lets a remote, unauthenticated attacker mint forged HMAC tokens whenever an application is misconfigured to accept both HMAC and asymmetric algorithms and passes a DER-encoded public key as the shared verification secret. PyJWT's HMACAlgorithm.prepare_key only rejected PEM- and SSH-formatted asymmetric keys using textual markers, so a DER public key (SubjectPublicKeyInfo, PKCS1, or a DER x509 certificate) slipped through and its public bytes were used directly as the HMAC secret - meaning anyone who knows the public key can sign valid tokens. The flaw is rated CVSS 7.4 with High attack complexity precisely because it requires that specific non-default application configuration; no public exploit code has been identified at time of analysis, and the vendor-released patch is PyJWT 2.14.0.
RemediationAI
Vendor-released patch: upgrade PyJWT to version 2.14.0, which adds the _is_der_key() check that rejects DER public keys and DER x509 certificates passed to HMACAlgorithm.prepare_key (see https://github.com/jpadilla/pyjwt/releases/tag/2.14.0 and advisory https://github.com/jpadilla/pyjwt/security/advisories/GHSA-p4g4-x82p-q773). Where an immediate upgrade is not possible, the most effective compensating control is to eliminate the algorithm-confusion precondition: pass an explicit, single-algorithm 'algorithms' list to jwt.decode (for example algorithms=['RS256'] for token verification, or algorithms=['HS256'] for symmetric-only deployments) and never allow HMAC and asymmetric algorithms to coexist in the same verification path; this fully blocks the attack at the cost of requiring callers to know and hard-code the expected algorithm, which breaks any legitimate multi-algorithm or key-rotation setups that rely on mixing families. A second control is to configure verification keys as PEM- or SSH-formatted material, since those encodings were already rejected by the pre-existing textual guard - but this is a fragile defense because it depends on input formatting rather than the fix's structural DER parsing. Note that the 2.14.0 guard will raise InvalidKeyError for DER keys previously (mis)used as HMAC secrets; any deployment that intentionally relied on that behavior must migrate to a properly generated high-entropy symmetric secret, otherwise token issuance/verification will begin failing after upgrade.
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
The root cause is CWE-347 (Improper Verification of Cryptographic Signature), realized as a classic algorithm-confusion weakness in PyJWT's cryptographic backend abstraction. PyJWT supports both symmetric HMAC algorithms (HS256/384/512) and asymmetric algorithms (RS*, ES*, PS*), and the library's Algorithm subclasses are selected by the caller-supplied 'algorithms' list or the token header. HMACAlgorithm.prepare_key previously refused asymmetric material by checking only textual encodings - is_pem_format() (looking for '-----BEGIN ... -----' armor) and is_ssh_key() (looking for 'ssh-rsa'/'ecdsa-sha2-' style prefixes). DER-encoded keys carry none of those ASCII markers, so a DER public key or DER x509 certificate was accepted as an HMAC secret and used byte-for-byte as the MAC key. Because a public key is by definition non-secret, an attacker who obtains it can compute the identical HMAC and forge tokens that the application will validate successfully. The fix in commit 2798504fa2663364573cf2d1043d8d7fef389499 introduces a static _is_der_key() helper that attempts cryptography's load_der_public_key() and x509.load_der_x509_certificate(); if either parses, the key is treated as asymmetric and rejected with InvalidKeyError. This path only activates when the optional 'cryptography' backend is installed (has_crypto), so deployments without cryptography were never reachable via the DER branch. Notably, the fix deliberately preserves acceptance of ordinary binary HMAC secrets that merely begin with DER-like bytes (e.g. b'\x30\x82not-a-der-key'), avoiding a false-positive regression for legitimate random secrets.
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
Network-reachable and unauthenticated (PR:N) since only the public key is needed, but AC:H because it depends on a mixed-algorithm + DER-key-as-secret misconfiguration; forged tokens grant impersonation so C:H/I:H, no availability impact.
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.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.
Blast Radius
ecosystem impact- 275 pypi packages depend on pyjwt (199 direct, 76 indirect)
Ecosystem-wide dependent count for version 2.4.0.
Articles & Coverage 1
Technical POC Analysis
CWE-347 (Improper Verification of Cryptographic Signature), specifically the classic JWT "key confusion" pattern that CVE-2022-29217 was filed for, re-reachable through a different key encoding.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A signature-forgery flaw in the PyJWT Python library (versions 2.4.0 through 2.13.x), widely used by Python services to issue and verify authentication tokens, could allow an attacker to mint tokens that pass verification and impersonate users or services wherever an application has been misconfigured to accept both symmetric and asymmetric algorithms against the same key material. Exposure is bounded by that specific non-default configuration, so the practical blast radius is limited to teams that have not pinned an explicit algorithm allowlist - but for those teams the consequence is a direct break in the authentication trust boundary that underpins session management and access control. Leadership should treat this as a high-priority remediation item for any internet-facing service that relies on PyJWT to gate access.
Apply vendor patch: upgrade to PyJWT 2.14.0. Until the upgrade is complete, enforce an explicit algorithm allowlist in every jwt.decode call so HMAC and asymmetric algorithms are never accepted together; reject DER-encoded keys (PKCS1, SubjectPublicKeyInfo, or DER x509 certificates) and any key material supplied as a verification secret that does not match the expected algorithm family; validate that the configured key type aligns with the expected signing algorithm; and monitor and rotate any signing keys or shared secrets reachable by a misconfigured verifier.
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 | Affected |
| SUSE Linux Enterprise High Performance Computing 12 | Not-Affected |
| SUSE Linux Enterprise Micro 5.5 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP7 | Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP7 | Affected |
| SUSE Linux Enterprise Server 15 SP7 | Affected |
| SUSE Linux Enterprise Server 16.0 | Affected |
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| SUSE Linux Micro 6.0 | Affected |
| SUSE Linux Micro 6.1 | Affected |
| SUSE Linux Micro 6.2 | Affected |
| openSUSE Leap 16.0 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP4 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP6 | Affected |
| SUSE Linux Enterprise Module for Public Cloud 12 | Not-Affected |
| SUSE Linux Enterprise Module for Public Cloud 15 SP4 | Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP4 | Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP6 | Affected |
| SUSE Linux Enterprise Server 12 SP5 | Not-Affected |
| SUSE Linux Enterprise Server 12 SP5-LTSS | Not-Affected |
| SUSE Linux Enterprise Server 15 SP4 | Affected |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP5 | Affected |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP6 | Affected |
| SUSE Linux Enterprise Server 15 SP6-LTSS | 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 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Affected |
| SUSE CaaS Platform 3.0 | Not-Affected |
| SUSE CaaS Platform 4.0 | Affected |
| SUSE Enterprise Storage 6 | Affected |
| SUSE Enterprise Storage 7 | Affected |
| SUSE Enterprise Storage 7.1 | Affected |
| SUSE Linux Enterprise Desktop 15 SP1 | Affected |
| SUSE Linux Enterprise Desktop 15 SP2 | Affected |
| SUSE Linux Enterprise Desktop 15 SP3 | Affected |
| SUSE Linux Enterprise Desktop 15 SP4 | Affected |
| SUSE Linux Enterprise Desktop 15 SP5 | Affected |
| SUSE Linux Enterprise Desktop 15 SP6 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP1 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP1-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP1-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP2 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP2-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP2-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP3 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP3-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP3-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP1 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP2 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP3 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP1 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP2 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP3 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Public Cloud 15 SP1 | Affected |
| SUSE Linux Enterprise Module for Public Cloud 15 SP2 | Affected |
| SUSE Linux Enterprise Real Time 15 SP2 | Affected |
| SUSE Linux Enterprise Real Time 15 SP3 | Affected |
| SUSE Linux Enterprise Real Time 15 SP4 | 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 | Affected |
| SUSE Linux Enterprise Server 15 SP1-BCL | Affected |
| SUSE Linux Enterprise Server 15 SP1-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP2 | Affected |
| SUSE Linux Enterprise Server 15 SP2-BCL | Affected |
| SUSE Linux Enterprise Server 15 SP2-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP3 | Affected |
| SUSE Linux Enterprise Server 15 SP3-BCL | Affected |
| SUSE Linux Enterprise Server 15 SP3-LTSS | 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 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP2 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP3 | Affected |
| SUSE Manager Proxy 4.0 | Affected |
| SUSE Manager Proxy 4.1 | Affected |
| SUSE Manager Proxy 4.2 | Affected |
| SUSE Manager Proxy 4.3 | Affected |
| SUSE Manager Proxy LTS 4.3 | Affected |
| SUSE Manager Retail Branch Server 4.0 | Affected |
| SUSE Manager Retail Branch Server 4.1 | Affected |
| SUSE Manager Retail Branch Server 4.2 | Affected |
| SUSE Manager Retail Branch Server 4.3 | Affected |
| SUSE Manager Retail Branch Server LTS 4.3 | Affected |
| SUSE Manager Server 3.2 | Not-Affected |
| SUSE Manager Server 4.0 | Affected |
| SUSE Manager Server 4.1 | Affected |
| SUSE Manager Server 4.2 | Affected |
| SUSE Manager Server 4.3 | Affected |
| SUSE Manager Server LTS 4.3 | Affected |
| SUSE OpenStack Cloud 7 | Not-Affected |
| openSUSE Leap 15.3 | Affected |
| openSUSE Leap 15.4 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
EUVD-2026-88539
GHSA-p4g4-x82p-q773
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB