---
schema_version: '1.0'
id: security-20260930-7d5883
title: 'CVE-2026-102267: PyJWT: PyJWKClient follows redirects when fetching JWKS'
url: https://osv.dev/vulnerability/GHSA-9v7f-9g4p-ffgj
url_hash: 7d5883f8a3a77250756b3b793aaf27f6e6dcc8a227a721a75133bef2978d26cf
canonical_url: https://osv.dev/vulnerability/GHSA-9v7f-9g4p-ffgj
source: osv:ghsa
category: security/library
category_raw: cve/library
region: null
tags:
- cve
- CVE-2026-102267
- GHSA-9v7f-9g4p-ffgj
- severity:CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
- pyjwt
- PyPI
lang: en
published_at: '2026-09-29T23:15:00Z'
fetched_at: '2026-09-30T03:55:36.220698Z'
updated_at: '2026-09-30T04:20:39Z'
status: published
content_hash: d8b14623764a8d0a7767951078083947b44f38eb862a65bda35b1eda464e9ab0
content_changed_at: null
license_note: full
summary: 'PyJWT: PyJWKClient follows redirects when fetching JWKS'
summary_source: rss
summary_en: 'PyJWT: PyJWKClient follows redirects when fetching JWKS'
summary_omitted_reason: null
redistribution: true
keywords_en:
- cve
- CVE-2026-102267
- CVE-2026-59980
- fetching
- follows
- GHSA-9v7f-9g4p-ffgj
- JWKS
- library vulnerability
- PyJWKClient
- PyJWT
- PyPI
- redirects
- severity:CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
- software security
- when
entities_en:
- name: CVE-2026-59980
  type: concept
- name: PyJWT
  type: artifact
topics_en:
- library vulnerability
- software security
numeric_facts: []
entities:
- name: CVE-2026-59980
  type: concept
- name: PyJWT
  type: artifact
key_facts: []
related: []
related_auto: []
computed_at: '2026-09-30T04:20:33Z'
---

# CVE-2026-102267: PyJWT: PyJWKClient follows redirects when fetching JWKS

## TL;DR
PyJWT: PyJWKClient follows redirects when fetching JWKS

## Key Points
- cve / CVE-2026-102267 / GHSA-9v7f-9g4p-ffgj / severity:CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N / pyjwt / PyPI

## Details
**Severity:** CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
**Advisory:** GHSA-9v7f-9g4p-ffgj (CVE-2026-102267)

**Details:**
### 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.

**References:**
- 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

_Data: OSV.dev (upstream: ghsa) — https://osv.dev/vulnerability/GHSA-9v7f-9g4p-ffgj_

## Source
元記事: [CVE-2026-102267: PyJWT: PyJWKClient follows redirects when fetching JWKS](https://osv.dev/vulnerability/GHSA-9v7f-9g4p-ffgj) — published 2026-09-29T23:15:00Z
