# 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.

- **Severity:** Medium 4.2 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N`)
- **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:** Yes
- **Published:** 28 May 2026
- **Updated:** 2 Jun 2026
- **Also known as:** AZL-93036, BELL-CVE-2026-48522, CLEANSTART-2026-CA24023, DEBIAN-CVE-2026-48522, ECHO-48dd-029f-8278, GHSA-993g-76c3-p5m4, MINI-43ch-j7q4-4q7g, MINI-4pv6-rpvw-8x65, MINI-6c26-3prg-6pwm, MINI-6cvv-rr78-7fcp, MINI-72mm-whg5-m9p5, MINI-7gq7-7p5q-wqcm, MINI-89gp-7gvp-f7rf, MINI-9w29-c63m-8gj6, MINI-ch2v-c4gj-fj56, MINI-cqg2-4mxx-3hjm, MINI-f3g5-5h62-g7xg, MINI-f7m5-v6r6-75j9, MINI-h4qv-qfq4-fj69, MINI-h5jj-p89w-633h, MINI-hpxh-hffj-hj53, MINI-hvch-339h-grpv, MINI-j297-gfmx-rjm7, MINI-p8mv-7279-49m3, MINI-pffq-r69g-26p3, MINI-pv99-gfxr-mvqm, MINI-q25c-27w4-69p2, MINI-r85m-vc4x-xr62, MINI-r9gg-4m6f-9q5g, MINI-v7f4-gv4h-4x48, MINI-vjp2-27f7-8gwc, MINI-vwcv-xcw3-hg7x, MINI-w4m8-f9cc-7j78, MINI-wr87-xwg2-x7hj, PYSEC-2026-175, ROOT-APP-PYPI-CVE-2026-48522, UBUNTU-CVE-2026-48522

## 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 (Server-Side Request Forgery), CWE-441 (Unintended Proxy or Intermediary)

## 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 | Ecosystem | 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: Pyjwt Project Pyjwt.

## How do I fix CVE-2026-48522?

Upgrade pyjwt to 2.13.0 or later.

## 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](https://insights.sbomify.com/CVE-2026-102268/): PyJWT: Asymmetric-PEM detection bypass: whitespace/line-ending-mutated public keys skip the HS/asymmetric confusion guard (critical 9.1)
- [CVE-2026-32597](https://insights.sbomify.com/CVE-2026-32597/): PyJWT accepts unknown `crit` header extensions (RFC 7515 §4.1.11 MUST violation) (high 7.5)
- [CVE-2026-102266](https://insights.sbomify.com/CVE-2026-102266/): PyJWK accepts empty HMAC keys, bypassing PyJWT's empty-key validation (high 7.4)
- [CVE-2026-102267](https://insights.sbomify.com/CVE-2026-102267/): PyJWT: PyJWKClient follows redirects when fetching JWKS (high 7.4)
- [CVE-2026-102271](https://insights.sbomify.com/CVE-2026-102271/): PyJWT: Public keys in DER form are accepted as HMAC secrets, bypassing the CVE-2022-29217 guard (high 7.4)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-48522 and fix it if it is affected.

What it is: 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.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-48522 exists.

Affected packages and fixed versions:
- pyjwt (PyPI): affected all versions; fixed in 2.13.0
- pyjwt (PyPI): affected from 2.0.0; fixed in 2.13.0
- PyJWT (PyPI): affected from 2.0.0; fixed in 2.13.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-48522/ (Markdown: https://insights.sbomify.com/CVE-2026-48522/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-48522
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-48522
- OSV: https://osv.dev/vulnerability/CVE-2026-48522

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-48522/
Summaries are generated and may contain mistakes; the official description above is the record.
