Skip to main content
← All vulnerabilities
CVE-2026-48522PYSEC-2026-175GHSA-993G-76C3-P5M4

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

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 2.13.0
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • jpadilla pyjwt

    fixed in 2.13.0

  • pyjwtPyPI

    fixed in 2.13.0

  • pyjwtPyPI

    From 2.0.0 · fixed in 2.13.0

References 1

GitHub · jpadilla/pyjwt