Skip to main content

PyJWT CVE-2026-102265

| EUVDEUVD-2026-88549 MEDIUM
Uncontrolled Recursion (CWE-674)
2026-09-28 GitHub_M GHSA-8wjv-2p76-3863
5.3
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach endpoint that decodes JWTs
  2. Delivery
    Craft token with deeply nested header JSON
  3. Exploit
    Submit malformed token unauthenticated
  4. Execution
    json.loads exceeds recursion limit
  5. Persist
    Uncaught RecursionError escapes handler
  6. Impact
    Request fails with HTTP 500

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
Exploitation Conditions

No special product configuration is required beyond the application calling PyJWT 2.13.0's jwt.decode / PyJWS.decode on attacker-supplied token input at an endpoint reachable without authentication (AV:N/PR:N/UI:N). The only limiting factors are: the target must run PyJWT exactly in the 2.13.0-to-pre-2.14.0 range, and impact is bounded to a single failed request (HTTP 500) rather than a full service outage because Python's recursion limit turns the deep nesting into a discrete exception. Applications that already wrap PyJWT calls in broad exception handlers would absorb the RecursionError and avoid the 500, reducing real-world impact.

Impact

This is a genuine but low-severity availability issue, not a high-impact flaw. The provided CVSS 3.1 vector (5.3, AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L) is internally consistent with the description: a remote, unauthenticated attacker sends one crafted token with a deeply nested header; PyJWS._load catches ValueError but not RecursionError, so the RecursionError escapes PyJWT's documented exception hierarchy and surfaces as an unhandled exception, typically an HTTP 500 request-level failure. Impact is limited to availability, and only A:L - a single failed request rather than a sustained process crash or memory exhaustion, since Python's recursion limit converts the deep nesting into a caught-too-late exception rather than a hang. There is no confidentiality or integrity impact despite the 'Information Disclosure' tag, which is inaccurate. No EPSS score, no CISA KEV listing, and no public exploit code were supplied (the commit adds only unit tests, not a weaponized PoC), so exploitation status is 'no public exploit identified.' Net: real and trivially triggerable, but low real-world priority because it degrades one request, not the service, and the underlying library is ubiquitous only in the sense of the package - the actual attack surface is any endpoint that decodes attacker-supplied JWTs without wrapping PyJWT exceptions.

Exploit ScenarioDerived

An attacker submits a JWT whose header segment base64url-decodes to a deeply nested JSON structure (e.g., ~1000 nested brackets) to an unauthenticated endpoint that calls PyJWT's decode on PyJWT 2.13.0. json.loads exceeds Python's recursion limit, raising a RecursionError that PyJWT's _load does not catch, so it propagates as an unhandled exception and the web framework returns HTTP 500. No public exploit is published, but the fix commit's test case demonstrates the exact trigger payload.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 28, 2026

Malformed JSON Web Token headers can cause an uncaught RecursionError in PyJWT 2.13.0 through versions before 2.14.0, resulting in HTTP 500 for the request handling the token. Unauthenticated remote attackers can trigger the condition by sending a deeply nested JWS header to an application that calls jwt.decode or PyJWS.decode on untrusted token input. No public exploit identified at time of analysis; the assessed CVSS 3.1 score is 5.3 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L), making this a bounded availability impact rather than a confidentiality or integrity compromise.

RemediationAI

Upgrade PyJWT to version 2.14.0, the vendor-released patch that catches RecursionError in PyJWS._load and raises DecodeError instead; see the release at https://github.com/jpadilla/pyjwt/releases/tag/2.14.0, the advisory GHSA-8wjv-2p76-3863, and commit 06573692ebcdec8831c3927513b3e87c31fbbb62. If immediate upgrade is not possible, wrap all untrusted jwt.decode/PyJWS.decode calls in a handler that catches RecursionError as well as DecodeError and returns a generic 400/401 rather than a 500; the trade-off is that broad catching can mask unrelated programming errors, so log the exception class and avoid exposing stack details. Add reverse-proxy or framework request limits that reject oversized or pathologically nested Authorization/JWT header values before they reach Python; this reduces exposure but may reject unusually large legitimate tokens, which are atypical for protected headers. Rate limiting unauthenticated token endpoints is a compensating control because the assessed vector is PR:N and remote, but it only reduces request volume and does not eliminate the per-request 500.

Affected VersionsENISA

pyjwt 2.13.0, < 2.14.0

Affected Packages

pypi pyjwt fix: 2.14.0

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 implements JWS/JWT compact serialization; during decode, PyJWS._load base64url-decodes the protected header and passes it to json.loads. CWE-674 (Uncontrolled Recursion) applies because a header consisting of deeply nested JSON arrays consumes Python stack until the interpreter's recursion limit is reached. In PyJWT 2.13.0, the parser catches ValueError from invalid JSON but not RecursionError, so the exception escapes PyJWT's documented DecodeError hierarchy and propagates to the caller as an unexpected server error. The supplied CPE cpe:2.3:a:jpadilla:pyjwt:*:*:*:*:*:*:*:* identifies the PyJWT package, with the advisory range limited to 2.13.0 through pre-2.14.0. The fix commit 06573692 changes the except clause to catch ValueError and RecursionError, and adds a regression test feeding a 1000-level nested header, converting the failure into DecodeError('Invalid header'). The input tags include Information Disclosure, but the authoritative assessment and CVSS vector describe only availability impact (A:L with C:N/I:N); no data exposure is confirmed by the code change or advisory.

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

Vendor (GitHub_M) PRIMARY 5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
vuln.today AI 5.3 MEDIUM

Remote unauthenticated single crafted token (AV:N/AC:L/PR:N/UI:N); only availability affected and limited to one request failure, so A:L with C:N/I:N.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
SUSE MEDIUM
Red Hat 5.3 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

Lifecycle Timeline

2
Patch available
Sep 28, 2026 - 22:02 EUVD
CVE Published
Sep 28, 2026 - 20:48 cve.org
MEDIUM 5.3

DescriptionCVE.org

PyJWT is a Python implementation of JSON Web Token standards. From 2.13.0 until 2.14.0, PyJWS._load in jwt/api_jws.py is affected because parser catches ValueError but not RecursionError. This occurs when a deeply nested token header reaches json.loads. As a result, RecursionError escapes the documented PyJWT error hierarchy. Consequently, an unauthenticated malformed token can cause a request-level failure and HTTP 500. This issue is fixed in version 2.14.0.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 201 pypi packages depend on pyjwt (131 direct, 71 indirect)

Ecosystem-wide dependent count for version 2.13.0.

Threat Intelligence Overview

EPSS Score
0.3%
Top 80% exploitable
Prevalence
Ubiquitous
PyJWT is a de facto standard JWT library across the Python ecosystem
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Data Quality
8 sources
Confidence: High
EUVD 🇯🇵JVN NVD CVE.org EPSS Vulnrichment GHSA MSRC Vendor GitHub VulDB

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
High
Technical Impact
Partial

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

More in Pyjwt

View all
CVE-2026-102266 CRITICAL POC
9.1 Sep 28

Forged HS256 JSON Web Tokens can be accepted as authentic by PyJWT (pip package PyJWT) versions 2.13.0 through 2.13.x wh

CVE-2026-102275 HIGH POC
8.2 Sep 28

Improper validation in PyJWT 2.1.0 through 2.14.0 allows an attacker who already holds a stolen sender-constrained (DPoP

CVE-2026-102274 HIGH POC
7.5 Sep 28

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

CVE-2026-101918 HIGH POC
7.5 Sep 28

Unauthenticated denial of service in the PyJWT Python library (versions 2.0.0a1 through 2.14.0) allows a remote attacker

CVE-2024-53861 HIGH POC
7.5 Nov 29

pyjwt is a JSON Web Token implementation in Python. Rated high severity (CVSS 7.5), this vulnerability is remotely explo

CVE-2026-48526 HIGH POC
7.4 May 28

Authentication bypass in PyJWT versions prior to 2.13.0 allows remote attackers to forge valid JSON Web Tokens by exploi

CVE-2026-103001 MEDIUM POC
6.5 Sep 30

Reuse of a caller-supplied options mapping in PyJWT 2.11.0 through 2.13.0 can silently leave registered-claim verificati

CVE-2026-48525 MEDIUM POC
5.3 May 28

Uncontrolled resource consumption in PyJWT 2.8.0-2.12.1 exposes any service that verifies detached JWS tokens to unauthe

CVE-2026-102268 CRITICAL
9.1 Sep 28

Signature forgery in PyJWT before 2.14.0 allows an attacker who knows a target's asymmetric public key to forge HMAC-aut

CVE-2026-102267 CRITICAL
9.1 Sep 28

JWKS trust-boundary bypass in PyJWT's PyJWKClient allows a configured trusted JWKS endpoint that returns an HTTP 3xx red

CVE-2026-101917 HIGH
7.5 Sep 28

Unauthenticated attackers can amplify outbound HTTP traffic from any application that validates JWTs with PyJWT's PyJWKC

CVE-2017-11424 HIGH
7.5 Aug 24

In PyJWT 1.5.0 and below the `invalid_strings` check in `HMACAlgorithm.prepare_key` does not account for all PEM encoded

Vendor StatusVendor

SUSE

Severity: Moderate
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

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy