PyJWT: PyJWKClient follows redirects when fetching JWKS
Summary
PyJWT 2.13.0 PyJWKClient followed HTTP redirects while fetching a JWKS,
without validating the redirect destination. A configured trusted endpoint
could therefore redirect the client to a different host.
Impact
When an application uses PyJWKClient with caller-supplied request headers and
an attacker can influence the configured endpoint's response, the redirected
request could expose those headers and the redirected response could be used as
authoritative key material. This could cause JWKS trust poisoning and, in
affected mixed-configuration applications, forged JWT acceptance. The issue
requires an attacker-influenced redirect from the configured JWKS endpoint; it
is not triggered by a token kid alone.
Affected versions
PyJWT <= 2.13.0.
Fix
The issue is fixed on master in commit
0a795b8e1f6ef08f634aa7086fc41cc6d5ce3e56.
PyJWKClient now disables automatic redirects for JWKS fetches. Regression
tests verify that a redirect is rejected without contacting its destination,
while normal fetches, headers, caching, errors, timeouts, and SSL context remain
covered.
The fix is present in the unreleased development branch. The patched version will be recorded after a released PyJWT 2.x version containing the fix is confirmed.
Credit
Credit: the original reporter of GHSA-9v7f-9g4p-ffgj. Additional redirect header-leak and cache-poisoning evidence from the newer duplicate report GHSA-43g3-98cx-x446 is preserved in the duplicate record and informed this canonical advisory update.
Maintainer update — 2026-09-11
The verified fix for this advisory is included in PyJWT 2.14.0, released on 2026-09-11 and available on PyPI. PyJWT 2.14.0 is the first release containing the fix. This advisory is now published with 2.14.0 recorded as the patched version.
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| Python (PyPI) | pyjwt | < 2.14.0 | 2.14.0 |
Verweise
- https://github.com/jpadilla/pyjwt/security/advisories/GHSA-9v7f-9g4p-ffgj
- https://nvd.nist.gov/vuln/detail/CVE-2026-102267
- https://github.com/jpadilla/pyjwt/commit/0a795b8e1f6ef08f634aa7086fc41cc6d5ce3e56
- https://github.com/jpadilla/pyjwt
- https://github.com/jpadilla/pyjwt/releases/tag/2.14.0
- https://pypi.org/project/pyjwt
- https://github.com/advisories/GHSA-9v7f-9g4p-ffgj
- CVSS-Vektor
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N- Schwäche (CWE)
CWE-200, CWE-345, CWE-918- Plattform
- Python (PyPI)
- Paket
pyjwt- Veröffentlicht
- 29.09.2026
- Aktualisiert
- 11.10.2026 15:18
Quellen und Lizenzen
OSV / GitHub Advisory Database - PYSEC-2026-4144 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-9v7f-9g4p-ffgj - CC BY 4.0
Schwachstellenhistorie: pyjwt
Alle veröffentlichten Schwachstellen dieses Pakets (Python (PyPI)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.
- Einträge insgesamt
- 24
- Erste → letzte
- 08.2017 09.2026
- Ohne Fix
- 2
- In Angriffen ausgenutzt
- 0
Verteilung nach Schweregrad
- Kritisch 1
- Hoch 10
- Mittel 11
- Niedrig 2
Veröffentlichungen pro Jahr
- 2017: 1
- 2018: 0
- 2019: 0
- 2020: 0
- 2021: 0
- 2022: 1
- 2023: 0
- 2024: 1
- 2025: 1
- 2026: 20
-
PyJWT: PyJWKClient follows redirects when fetching JWKS dieser Eintrag
Erkennen Sie Schwachstellen in Ihrer Anwendung
Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.