CVE-2026-102265: PyJWT denial of service via deeply nested token headers

CVE-2026-102265 · Severity: medium · CVSS 5.3 · Published 2026-09-28

PyJWT is a Python library that processes JSON Web Tokens, which are widely used for authentication in web applications. A flaw in versions 2.13.0 through 2.13.x allows an attacker to send a malformed token with deeply nested header fields, causing the server to crash with an unhandled error and return an HTTP 500 response. This creates a denial-of-service condition affecting any application using the vulnerable library versions.

Technologies: PyJWT, pyjwt (PyPI). Vendors: PyJWT, PyPI.

Quick answers

Is CVE-2026-102265 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-102265 being exploited in the wild.
How severe is CVE-2026-102265?
Medium severity, with a CVSS score of 5.3, published 28 September 2026.
Which products and versions are affected?
PyJWT 2.13.0 to 2.13.x; pyjwt (PyPI) >= 2.13.0, < 2.14.0, ECOSYSTEM:introduced=2.13.0,fixed=2.14.0.
Is there a fix for CVE-2026-102265?
Yes. pyjwt (PyPI): upgrade to 2.14.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-102265 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-102265?
Check whether you run PyJWT or pyjwt (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • pyjwt (PyPI): upgrade to 2.14.0 or later
    pip install "pyjwt>=2.14.0"

Technical details

The vulnerability exists in PyJWS._load (jwt/api_jws.py) where the JSON parser can raise a RecursionError on deeply nested structures, but the error handler only catches ValueError. An unauthenticated attacker can supply a malformed token with recursive header nesting to trigger the unhandled RecursionError, escaping PyJWT's documented error hierarchy. The fix, released in version 2.14.0, adds proper handling for RecursionError during token parsing.

Affected products

  • PyJWT PyJWT 2.13.0 to 2.13.x

Identifiers

  • CVE-2026-102265
  • GHSA-8wjv-2p76-3863
  • PYSEC-2026-4142

Timeline

  • 2026-09-28: disclosed
  • 2026-09-11: patched: Fixed in version 2.14.0

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.