CVE-2026-48525: PyJWT Denial of Service in detached JWS verification

CVE-2026-48525 · Severity: medium · CVSS 5.3 · Published 2026-05-28

PyJWT is a popular Python library used to handle JSON Web Tokens (JWTs) for authentication and data exchange. A flaw in how it processes certain types of tokens allows an unauthenticated attacker to send a specially crafted, oversized request that forces the server to perform heavy computations and consume large amounts of memory. This can lead to a denial-of-service (DoS) condition, making the application slow or completely unresponsive to legitimate users.

Technologies: pyjwt (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2026-48525 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-48525 being exploited in the wild.
How severe is CVE-2026-48525?
Medium severity, with a CVSS score of 5.3, published 28 May 2026.
Which products and versions are affected?
pyjwt (PyPI) ECOSYSTEM:introduced=2.8.0,fixed=2.13.0.
Is there a fix for CVE-2026-48525?
Yes. pyjwt (PyPI): upgrade to 2.13.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-48525 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-48525?
Check whether you run 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.13.0 or later
    pip install "pyjwt>=2.13.0"

Technical details

The vulnerability exists in the `_load()` function within `jwt/api_jws.py`. When a JWS token uses the unencoded-payload option (`"b64": false` per RFC 7797), PyJWT unconditionally performs Base64URL decoding on the payload segment of the compact serialization before checking the header. Because this decoding happens before signature verification and the resulting data is ultimately discarded in favor of the `detached_payload`, an attacker can provide an extremely large payload segment to trigger significant CPU and memory consumption. This allows a remote, unauthenticated attacker to cause a Denial of Service (DoS) via resource exhaustion. The issue was introduced with detached payload support in version 2.4.0 and is patched in version 2.13.0.

Affected products

  • jpadilla PyJWT >= 2.4.0, <= 2.12.1

Identifiers

  • CVE-2026-48525
  • GHSA-w7vc-732c-9m39
  • PYSEC-2026-178

Timeline

  • 2026-05-21: disclosed
  • 2026-06-15: advisory
  • 2026-06-15: patched

References

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