CVE-2026-48522 PyJWKClient: missing scheme allowlist enables SSRF + token forgery via file://, ftp://, data: schemes
Attackers can exploit missing scheme restrictions in PyJWKClient to perform SSRF, read local files, or forge tokens if URL inputs are untrusted.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-48522?
CVE-2026-48522 is a medium-severity server-side request forgery vulnerability in jpadilla pyjwt, published on 28 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
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.
Which versions are affected by CVE-2026-48522?
3 open source packages ship an affected version, including pyjwt and PyJWT. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
pyjwt PyPI | All versions | 2.13.0 |
pyjwt PyPI | From 2.0.0 | 2.13.0 |
PyJWT PyPI | From 2.0.0 | 2.13.0 |
Products include Pyjwt Project Pyjwt.
How do I fix CVE-2026-48522?
Upgrade pyjwt to 2.13.0 or later.
Upgrade, and send outbound requests through an allow-list that blocks internal addresses. More about Server-side request forgery.
Is CVE-2026-48522 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-48522 exists.
Other vulnerabilities in jpadilla pyjwt
- CVE-2026-102268 PyJWT: Asymmetric-PEM detection bypass: whitespace/line-ending-mutated public keys skip the HS/asymmetric confusion guard
- CVE-2026-32597 PyJWT accepts unknown `crit` header extensions (RFC 7515 §4.1.11 MUST violation)
- CVE-2026-102266 PyJWK accepts empty HMAC keys, bypassing PyJWT's empty-key validation
- CVE-2026-102267 PyJWT: PyJWKClient follows redirects when fetching JWKS
- CVE-2026-102271 PyJWT: Public keys in DER form are accepted as HMAC secrets, bypassing the CVE-2022-29217 guard
Sources
Also known as AZL-93036, BELL-CVE-2026-48522, CLEANSTART-2026-CA24023, DEBIAN-CVE-2026-48522, ECHO-48dd-029f-8278, GHSA-993g-76c3-p5m4 and 31 more.