Skip to main content

PyJWT CVE-2026-48522

| EUVDEUVD-2026-32915 MEDIUM
Unintended Proxy or Intermediary ('Confused Deputy') (CWE-441)
2026-05-28 GitHub_M GHSA-993g-76c3-p5m4 PYSEC-2026-175
4.2
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Identify application accepting attacker-influenced jku
  2. Delivery
    Craft JWT with malicious file:// or FTP URI in jku header
  3. Exploit
    Submit JWT to trigger PyJWKClient fetch
  4. Execution
    urllib fetches arbitrary-scheme URI on server
  5. Impact
    Partial information disclosure via error or side-channel

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service Proxy/intermediary controls
Exploitation Conditions

Exploitation requires the application to use PyJWKClient (not merely PyJWT's core token API) and to supply PyJWKClient with a URI that is at least partially influenced by attacker-controlled input - specifically from the JWT jku header claim, an OAuth flow parameter, or an externally writable configuration file. Applications that instantiate PyJWKClient with a developer-hardcoded JWKS URL are not vulnerable to this attack path. The CVSS vector AC:H confirms that multiple conditions must align for exploitation, and UI:R confirms that a user action (such as initiating a token verification request) must occur before the malicious URI is fetched. The token-forgery variant described in the advisory additionally requires attacker write access to a local filesystem path accessible via the file:// URI and an application-layer flaw in jku derivation logic - neither of which is addressed by the PyJWT 2.13.0 fix alone. What limits exploitation most practically: the jku URI must be attacker-influenced (uncommon in hardened deployments), and direct content exfiltration is not confirmed without further application-layer weaknesses.

Impact

CVSS 4.2 (Medium) with vector AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N reflects a scenario where exploitation is network-reachable but requires high complexity and user interaction before PyJWKClient is invoked with the attacker-controlled URI. The low confidentiality and integrity impact scores align with the description's caveat that the library does not directly return file contents to the attacker - full token forgery requires additional application-layer flaws (attacker write access to a local path, untrusted jku derivation logic). No EPSS score was provided in the input data; one cannot be inferred. No CISA KEV listing and no publicly available exploit code are identified at time of analysis. SSRF vulnerabilities targeting JWT validation libraries have historically seen targeted exploitation in API-heavy cloud environments, but the multiple preconditions here (attacker-controlled jku, AC:H, UI:R) materially reduce the realistic threat surface compared to simpler SSRF classes. The primary risk is to applications that dynamically resolve jku values from incoming JWTs without a hardcoded or allow-listed JWKS endpoint - a pattern common in multi-tenant SaaS or federated identity flows. CVSS AC:H and UI:R are the most significant limiting signals; this is not a broadly automatable vulnerability against default configurations.

Exploit ScenarioDerived

An attacker targeting a multi-tenant API that dynamically resolves the jku claim from incoming JWT headers crafts a token with a jku value of file:///etc/passwd or an FTP URI pointing to an attacker-controlled server. When a legitimate user triggers a token-validation flow, PyJWKClient fetches the attacker-supplied URI via urllib; depending on error-handling in the application, the attacker may observe timing differences, error messages, or DNS callbacks that confirm internal resource existence or leak partial file content. No public proof-of-concept exploit is identified at time of analysis, but the attack primitive is well-understood in SSRF research.

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

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

Alert me

AnalysisAIv1 – May 28, 2026

PyJWKClient in PyJWT prior to 2.13.0 passes attacker-influenced URIs directly to Python's urllib.request.urlopen() without restricting URI schemes, enabling Server-Side Request Forgery (SSRF) across file://, FTP, and data-URI schemes against applications that accept untrusted jku values. Affected deployments include any Python application using PyJWKClient where the jku URL originates from a JWT header, OAuth flow parameter, or externally influenced configuration. No public exploit exists and no CISA KEV listing is present; real-world exploitation is constrained by a CVSS-confirmed high attack complexity (AC:H) and required user interaction (UI:R), making opportunistic mass exploitation unlikely.

RemediationAI

Upgrade PyJWT to version 2.13.0, which is confirmed as the vendor-released fix per the GitHub Security Advisory GHSA-993g-76c3-p5m4 at https://github.com/jpadilla/pyjwt/security/advisories/GHSA-993g-76c3-p5m4. The fix restricts PyJWKClient to HTTP and HTTPS schemes only, eliminating the file://, FTP, and data-URI attack surface. For deployments where an immediate upgrade is not possible, the most effective compensating control is to refactor the application to pass only a hardcoded, allow-listed JWKS URI to PyJWKClient rather than accepting the jku value from incoming JWT headers or external parameters; this eliminates attacker influence over the URI entirely and does not require changes to PyJWT itself. A secondary control is to apply egress network filtering that blocks the process running PyJWKClient from making non-HTTP(S) outbound connections, mitigating FTP and local file access at the network layer without addressing the root cause. Neither workaround substitutes for patching, as both introduce operational complexity and leave the underlying unfiltered call intact.

Affected VersionsENISA

pyjwt < 2.13.0

Affected Packages

pypi pyjwt fix: 2.13.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 is the dominant Python library for JSON Web Token creation and validation (CPE: cpe:2.3:a:jpadilla:pyjwt:*:*:*:*:*:*:*:*). PyJWKClient is its helper class for fetching JSON Web Key Sets (JWKS) from a remote URI to validate token signatures. The vulnerability arises because PyJWKClient passes the supplied uri argument directly to Python's urllib.request.urlopen(), which uses the default OpenerDirector. That director registers handlers for HTTP, HTTPS, FTP, file://, and data-URI schemes with no application-level filtering. CWE-441 (Unintended Proxy or Intermediary) precisely characterizes the root cause: PyJWKClient acts as an unrestricted intermediary fetching resources on behalf of whoever controls the URI, regardless of scheme. The library does not directly return non-HTTP(S) content to the caller, meaning simple file exfiltration requires an additional application flaw; however, side-channel behaviors (error messages, timing, DNS lookups) can still leak information about internal resources.

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 4.2 MEDIUM
AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N
SUSE MEDIUM
Red Hat 4.2 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

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

Lifecycle Timeline

1
Patch available
May 28, 2026 - 17:01 EUVD

DescriptionCVE.org

PyJWT is a JSON Web Token implementation in Python. Prior to 2.13.0, PyJWKClient passes its uri argument directly to urllib.request.urlopen() which uses Python stdlib's default OpenerDirector registering HTTPHandler, HTTPSHandler, FTPHandler, FileHandler, and DataHandler. There is currently no documented option to restrict which schemes PyJWKClient will fetch. If an application's jku URL ingestion path accepts attacker-influenced URLs (e.g., from JWT header, configuration file, OAuth flow parameter), the attacker can cause PyJWKClient to read arbitrary local files via file:// (SSRF on local filesystem), cause PyJWKClient to attempt FTP / data-URI fetches (broader SSRF surface), or forge tokens that PyJWT verifies as valid. The library does not directly return non-HTTP(S) URI contents to the attacker; the chained "plant a JWKS to forge tokens" scenario described in the original report requires additional application-layer flaws (attacker write access to a filesystem path, untrusted jku derivation) that this fix does not address. This vulnerability is fixed in 2.13.0.

Blast Radius

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

Ecosystem-wide dependent count for version 2.13.0.

Threat Intelligence Overview

EPSS Score
0.0%
Top 92% exploitable
Threat Intel
1
1 sources
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA MSRC Vendor CIRCL GitHub

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 No
EPSS 0.0%
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
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

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

Attack Technique

Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.

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-102265 MEDIUM POC
5.3 Sep 28

Malformed JSON Web Token headers can cause an uncaught RecursionError in PyJWT 2.13.0 through versions before 2.14.0, re

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-48524 LOW POC
3.7 May 28

Unconstrained outbound JWKS requests in PyJWT's PyJWKClient.get_signing_key() allow unauthenticated remote attackers to

Vendor StatusVendor

SUSE

Severity: Medium
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Fixed
SUSE Linux Enterprise High Performance Computing 12 Fixed
SUSE Linux Enterprise High Performance Computing 15 SP7 Fixed
SUSE Linux Enterprise Micro 5.5 Fixed
SUSE Linux Enterprise Module for Basesystem 15 SP7 Fixed

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