Junglewise Threat Intelligence

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

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

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

Executive brief

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.

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

Timeline

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

References

Related threats