Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. PyJWT
  4. ›
  5. CVE-2026-48522

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

June 15, 2026

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:

  1. Cause PyJWKClient to read arbitrary local files via file:// (SSRF on local filesystem) — the file’s contents are passed to json.load.
  2. Cause PyJWKClient to attempt FTP / data-URI fetches (broader SSRF surface).
  3. Forge tokens that PyJWT verifies as valid — if the attacker can write to any path the JKU URL points at AND influences the URL, they can plant a JWK Set containing their own public key, sign tokens with the matching private key, and jwt.decode() accepts.

References

  • github.com/advisories/GHSA-993g-76c3-p5m4
  • github.com/jpadilla/pyjwt/security/advisories/GHSA-993g-76c3-p5m4
  • github.com/pypa/advisory-database/tree/main/vulns/pyjwt/PYSEC-2026-175.yaml
  • nvd.nist.gov/vuln/detail/CVE-2026-48522

Code Behaviors & Features

Detect and mitigate CVE-2026-48522 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.13.0

Fixed versions

  • 2.13.0

Solution

Upgrade to version 2.13.0 or above.

Impact 4.2 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-441: Unintended Proxy or Intermediary ('Confused Deputy')
  • CWE-918: Server-Side Request Forgery (SSRF)

Source file

pypi/PyJWT/CVE-2026-48522.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 23 Jun 2026 12:24:02 +0000.