Vulnerability · Published May 28, 2026 · Assigned by GitHub_M

CVE-2026-48522PyJWKClient: missing scheme allowlist enables SSRF + token forgery via file://, ftp://, data: schemes

Medium 4.2

In plain English

A medium-severity server-side request forgery in pyjwt from jpadilla. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 13% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)4.2Medium
Exploit odds (30 days)0.2%top 87.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12pyjwtno fix listedDEBIAN-CVE-2026-48522
Debian:13pyjwtno fix listedDEBIAN-CVE-2026-48522
Debian:14pyjwt2.13.0-1DEBIAN-CVE-2026-48522
PyPIpyjwt2.13.0GHSA-993g-76c3-p5m4
PyPIpyjwt2.13.0PYSEC-2026-175
Ubuntu:22.04:LTSpyjwt2.3.0-1ubuntu0.4USN-8823-1
Ubuntu:22.04:LTSpyjwt2.3.0-1ubuntu0.4UBUNTU-CVE-2026-48522
Ubuntu:24.04:LTSpyjwt2.7.0-1ubuntu0.2USN-8823-1
Ubuntu:24.04:LTSpyjwt2.7.0-1ubuntu0.2UBUNTU-CVE-2026-48522
Ubuntu:25.10pyjwtno fix listedUBUNTU-CVE-2026-48522
Ubuntu:26.04:LTSpyjwt2.10.1-4ubuntu1.1UBUNTU-CVE-2026-48522
Ubuntu:26.04:LTSpyjwt2.10.1-4ubuntu1.1USN-8823-1

Affected products (as reported)

VendorProductVersions
jpadilla pyjwt < 2.13.0

Weakness: CWE-441, CWE-918 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N

References