CVE-2026-102265 PyJWT: Uncaught RecursionError in jwt.decode() on deeply nested token header

Medium 5.3 Published Updated

An attacker can cause a denial of service by sending a deeply nested JWT token that triggers an unhandled RecursionError in PyJWT.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-102265?

CVE-2026-102265 is a medium-severity denial of service vulnerability in jpadilla pyjwt, published on 28 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

PyJWT is a Python implementation of JSON Web Token standards. From 2.13.0 until 2.14.0, PyJWS._load in jwt/api_jws.py is affected because parser catches ValueError but not RecursionError. This occurs when a deeply nested token header reaches json.loads. As a result, RecursionError escapes the documented PyJWT error hierarchy. Consequently, an unauthenticated malformed token can cause a request-level failure and HTTP 500. This issue is fixed in version 2.14.0.

Weakness: CWE-674

Which versions are affected by CVE-2026-102265?

3 open source packages ship an affected version, including pyjwt and pyJWT. It affects 1 product.

PackageAffectedFixed in
pyjwt PyPIFrom 2.13.02.14.0
pyjwt PyPIFrom 2.13.02.14.0
pyJWT PyPIFrom 2.13.02.14.0

Products include Pyjwt Project Pyjwt.

How do I fix CVE-2026-102265?

Upgrade pyjwt to 2.14.0 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2026-102265 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-102265 exists.

Sources

Also known as AZL-105230, CLEANSTART-2026-GA98365, CLEANSTART-2026-PF22063, DEBIAN-CVE-2026-102265, ECHO-7f74-1f00-2375, GHSA-8wjv-2p76-3863 and 16 more.

Is CVE-2026-102265 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free