1. CVE archive
  2. 2026
  3. CVE-2026-48522

CVE-2026-48522

4.2 Medium severity CVSS v3.1 · source NVD CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N 4.2 – Medium

Description

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.

Affected products

VendorProductVersionPlatform
pyjwt project pyjwt < 2.13.0 –
All 24 Pyjwt Project Pyjwt vulnerabilities

Vulnerability type

CWE-441 Unintended Proxy or Intermediary

The product receives a request, message, or directive from an upstream component, but the product does not sufficiently preserve the original source of the request before forwarding the request to an external actor that is outside of the product's control sphere.

Impact on systems

ScopeImpact
Non-Repudiation, Access Control Gain Privileges or Assume Identity, Hide Activities, Execute Unauthorized Code or Commands, Bypass Protection Mechanism
If an attacker cannot directly contact a target, but the product has access to the target, then the attacker can send a request to the product and have it be forwarded to the target. The source of this request would appear to be coming from the product's system, not the attacker's system, leading the product/system to act as a proxy or other intermediary between the upstream component and the external actor. As a result, the attacker can bypass access controls (such as firewalls) or hide the source of malicious requests, since the requests would not be coming directly from the attacker.

How to prevent it

Architecture and Design Enforce the use of strong mutual authentication mechanism between the two parties.
Architecture and Design Whenever a product is an intermediary or proxy for transactions between two other components, the proxy core should not drop the identity of the initiator of the transaction. The immutability of the identity of the initiator must be maintained and should be forwarded all the way to the target.

All 236 CWE-441 CVEs, with trend and prevention

Source: MITRE CWE catalog · cwe.mitre.org