All vulnerabilities
CVE-2026-102267GHSA-9v7f-9g4p-ffgjPYSEC-2026-4144

PyJWT: PyJWKClient follows redirects when fetching JWKS

jpadilla PyJWTpipLibraries & packages
CVSS
7.4High
ExploitationNo known exploitationNot in CISA KEV, which does not prove it is unexploitedCISA KEV
Exploit odds (EPSS)0.16%Chance of exploitation activity in the next 30 days, higher than 4% of CVEs. Scored 23 Oct 2026FIRST EPSS
Fixed in2.14.0Fixed versionGitHub
Published28 Sep 2026Updated 1 Oct 2026CVE List

What fixes it

  • 2.14.0PyJWT, pipGitHub
  • 2.14.0pyjwt, PyPIOSVpip install "pyjwt>=2.14.0"

A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.

Description

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](https://github.com/jpadilla/pyjwt/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.

Text from GitHub Advisory Database

Affected versions 53

  • PyJWT, pip<= 2.13.0GitHub
  • pyjwtaffected: < 2.14.0CVE List
  • pyjwt, PyPIfrom first release, fixed in 2.14.0OSV
  • pyjwt, PyPI0.1.1OSV
  • pyjwt, PyPI0.1.2OSV
  • pyjwt, PyPI0.1.3OSV
  • pyjwt, PyPI0.1.4OSV
  • pyjwt, PyPI0.1.5OSV
  • pyjwt, PyPI0.1.6OSV
  • pyjwt, PyPI0.1.7OSV
  • pyjwt, PyPI0.1.8OSV
  • pyjwt, PyPI0.1.9OSV
  • pyjwt, PyPI0.2.0OSV
  • pyjwt, PyPI0.2.1OSV
  • pyjwt, PyPI0.2.3OSV
  • pyjwt, PyPI0.3.0OSV
  • pyjwt, PyPI0.3.1OSV
  • pyjwt, PyPI0.3.2OSV
  • pyjwt, PyPI0.4.0OSV
  • pyjwt, PyPI0.4.1OSV
  • pyjwt, PyPI0.4.2OSV
  • pyjwt, PyPI0.4.3OSV
  • pyjwt, PyPI1.0.0OSV
  • pyjwt, PyPI1.0.1OSV
  • pyjwt, PyPI1.1.0OSV
  • pyjwt, PyPI1.3.0OSV
  • pyjwt, PyPI1.4.0OSV
  • pyjwt, PyPI1.4.1OSV
  • pyjwt, PyPI1.4.2OSV
  • pyjwt, PyPI1.5.0OSV
  • pyjwt, PyPI1.5.1OSV
  • pyjwt, PyPI1.5.2OSV
  • pyjwt, PyPI1.5.3OSV
  • pyjwt, PyPI1.6.0OSV
  • pyjwt, PyPI1.6.1OSV
  • pyjwt, PyPI1.6.3OSV
  • pyjwt, PyPI1.6.4OSV
  • pyjwt, PyPI1.7.0OSV
  • pyjwt, PyPI1.7.1OSV
  • pyjwt, PyPI2.0.0OSV
  • pyjwt, PyPI2.0.0a1OSV
  • pyjwt, PyPI2.0.0a2OSV
  • pyjwt, PyPI2.0.1OSV
  • pyjwt, PyPI2.1.0OSV
  • pyjwt, PyPI2.10.0OSV
  • pyjwt, PyPI2.10.1OSV
  • pyjwt, PyPI2.11.0OSV
  • pyjwt, PyPI2.12.0OSV
  • pyjwt, PyPI2.12.1OSV
  • pyjwt, PyPI2.13.0OSV
  • pyjwt, PyPI2.2.0OSV
  • pyjwt, PyPI2.3.0OSV
  • pyjwt, PyPI2.4.0OSV

References 5