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

Medium 4.2 Published Updated

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.

Weakness: CWE-918, CWE-441

Which versions are affected by CVE-2026-48522?

3 open source packages ship an affected version, including pyjwt and PyJWT. It affects 1 product.

PackageAffectedFixed in
pyjwt PyPIAll versions2.13.0
pyjwt PyPIFrom 2.0.02.13.0
PyJWT PyPIFrom 2.0.02.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.

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.

Is CVE-2026-48522 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free