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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | pyjwt | no fix listed | DEBIAN-CVE-2026-48522 |
| Debian:13 | pyjwt | no fix listed | DEBIAN-CVE-2026-48522 |
| Debian:14 | pyjwt | 2.13.0-1 | DEBIAN-CVE-2026-48522 |
| PyPI | pyjwt | 2.13.0 | GHSA-993g-76c3-p5m4 |
| PyPI | pyjwt | 2.13.0 | PYSEC-2026-175 |
| Ubuntu:22.04:LTS | pyjwt | 2.3.0-1ubuntu0.4 | USN-8823-1 |
| Ubuntu:22.04:LTS | pyjwt | 2.3.0-1ubuntu0.4 | UBUNTU-CVE-2026-48522 |
| Ubuntu:24.04:LTS | pyjwt | 2.7.0-1ubuntu0.2 | USN-8823-1 |
| Ubuntu:24.04:LTS | pyjwt | 2.7.0-1ubuntu0.2 | UBUNTU-CVE-2026-48522 |
| Ubuntu:25.10 | pyjwt | no fix listed | UBUNTU-CVE-2026-48522 |
| Ubuntu:26.04:LTS | pyjwt | 2.10.1-4ubuntu1.1 | UBUNTU-CVE-2026-48522 |
| Ubuntu:26.04:LTS | pyjwt | 2.10.1-4ubuntu1.1 | USN-8823-1 |
Affected products (as reported)
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
- https://github.com/jpadilla/pyjwt/security/advisories/GHSA-993g-76c3-p5m4 x_refsource_CONFIRM