Unrestricted URI schemes in PyJWKClient leading to SSRF
jpadilla pyjwt
At a glance
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.
Source description · CVE List / CNA
System impact
CVSS summary v3.1
- Published:
- Updated:
- EPSS:
- 0.214%
- Exploited in attacks:
- Not confirmed
- Ransomware campaigns:
- Not confirmed
- Attack vector:
- Network
Affected software
Vendor, product and affected version ranges.
| Vendor | Product | Affected versions |
|---|---|---|
| Vendor:jpadilla | pyjwt | Affected versions: < 2.13.0 |
| Vendor:Red Hat | Migration Toolkit for Applications 8 | Affected versions:Source does not specify a version range |
| Vendor:Red Hat | OpenShift Lightspeed | Affected versions:Source does not specify a version range |
| Vendor:Red Hat | Red Hat AI Inference Server | Affected versions:Source does not specify a version range |
| Vendor:Red Hat | Red Hat Ansible Automation Platform 2 | Affected versions:Source does not specify a version range |
| Vendor:Red Hat | Red Hat Enterprise Linux 10 | Affected versions:Source does not specify a version range |
| Vendor:Red Hat | Red Hat Enterprise Linux 9 | Affected versions:Source does not specify a version range |
| Vendor:Red Hat | Red Hat Enterprise Linux AI (RHEL AI) 3 | Affected versions:Source does not specify a version range |
| Vendor:Red Hat | Red Hat Hardened Images | Affected versions:Source does not specify a version range |
| Vendor:Red Hat | Red Hat OpenShift AI (RHOAI) | Affected versions:Source does not specify a version range |
1–10 of 45 · Page 1 of 5
CVSS scores and metrics5
GitHub_M · CVE List / CNA (cna)Primary4.2 / 10MediumCVSS 3.1Details
- Attack complexity
- High
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
- Attack vector
- Network
- Privileges required
- Not required
- User interaction
- Required
- Scope
- Unchanged
Source vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N[email protected] · NVD (Secondary)4.2 / 10MediumCVSS 3.1Details
- Attack complexity
- High
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
- Attack vector
- Network
- Privileges required
- Not required
- User interaction
- Required
- Scope
- Unchanged
Source vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:NCVE-2026-48522 · OSV (source-vector)4.2 / 10MediumCVSS 3.1Details
- Attack complexity
- High
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
- Attack vector
- Network
- Privileges required
- Not required
- User interaction
- Required
- Scope
- Unchanged
Source vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:NRed Hat · Red Hat VEX (adp)4.2 / 10MediumCVSS 3.1Details
- Attack complexity
- High
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
- Attack vector
- Network
- Privileges required
- Not required
- User interaction
- Required
- Scope
- Unchanged
Source vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:NSUSE · SUSE VEX (adp)4.8 / 10MediumCVSS 3.1Details
- Attack complexity
- High
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
- Attack vector
- Network
- Privileges required
- Not required
- User interaction
- Not required
- Scope
- Unchanged
Source vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:NCVSS measures severity; EPSS estimates exploitation probability. Lack of confirmed attacks does not mean lack of risk.
Sources and advisories8
This product uses the NVD API but is not endorsed or certified by the NVD. CVE® records © The MITRE Corporation, reproduced under the CVE Terms of Use. Data sources and licences