Improper Cleanup on Thrown Exception Affecting pyjwt package, versions [,2.13.0)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.34% (27th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-PYJWT-17054465
  • published29 May 2026
  • disclosed28 May 2026
  • creditUnknown

Introduced: 28 May 2026

CVE-2026-48524  (opens in a new tab)
CWE-460  (opens in a new tab)

How to fix?

Upgrade pyjwt to version 2.13.0 or higher.

Overview

Affected versions of this package are vulnerable to Improper Cleanup on Thrown Exception via the get_signing_key function. An attacker can exhaust system resources by sending numerous JWTs with attacker-controlled kid values, causing repeated outbound requests to the JWKS endpoint.

Note:

This is only exploitable if the JWKS fetch fails and the upstream endpoint does not implement effective rate limiting or error handling.

CVSS Base Scores

version 4.0
version 3.1