Vulnerability in PyJWT (CVE-2026-101918)
Summary
Vulnerability in PyJWT (CVE-2026-101918). Risk of unauthorized operations or information disclosure. Exploitable via json.loads. Mitigation: upgrade to 2.15.0 or later.
Original description
The description as published by the source.
Summary
PyJWKClient.get_signing_key_from_jwt(token) — the first step of the JWKS
verification flow documented in docs/usage.rst — must decode a token's
payload before its signature can be checked, via
jwt.api_jwt.decode_complete(token, options={"verify_signature": False}).
That call parses the payload with json.loads in PyJWT._decode_payload
(jwt/api_jwt.py:297-300), whose except clause catches only ValueError.
A payload that is valid JSON but nested ~20,000 levels deep makes
json.loads raise RecursionError, which is not a ValueError and
escapes as a raw, undocumented exception type — not DecodeError,
InvalidTokenError, or PyJWTError, so every documented error-handling
pattern in docs/usage.rst misses it.
The token needs no valid signature and no network access — the crash
happens during payload parsing, before the kid is even looked up. A
single unauthenticated ~50KB request crashes the caller's auth handler
(HTTP 500 / dead worker), repeatably. The same path is reachable through
plain jwt.decode(token, options={"verify_signature": False}) too.
Notably, this project already fixed the identical bug class for the
JWS header path — PyJWS._load catches (ValueError, RecursionError)
and wraps it in DecodeError (jwt/api_jws.py:360-361), and
CHANGELOG.rst (v2.14.0, "Security") states "Handle deeply nested and
malformed JWS/JWK input without uncaught recursion errors." The payload
path — the one part of a forged token an u…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-101918 has been found in PyJWT.
Attackers can target a specific entry point like json.loads over the network to misuse the product.
Risk of unauthorized operations or information disclosure. CVSS score: 5.3/10.
What to do: upgrade PyJWT to 2.15.0 or later.
If unsure, ask your IT team or search "PyJWT CVE-2026-101918" on the vendor's site.
CVE-2026-101918 (PyJWT) — CWE-248 / CVSS v3 5.3
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: json.loads / PyJWT._decode_payload / except / ValueError
Patched: 2.15.0 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-248) exists in PyJWT. Attackers reach the vulnerable code path via json.loads without authentication.
Check the vendor advisory for the affected versions of PyJWT. Attack surface: json.loads / PyJWT._decode_payload / except / ValueError.
Severity: Medium (CVSS 5.3/10). Risk of unauthorized operations or information disclosure.
Update to 2.15.0.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'PyJWT' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'PyJWT' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
PyJWTを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade PyJWT to 2.15.0ステージング環境で 2.15.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
Fix status by distribution
Fixed packages published by each distribution for this CVE
- Debian DEBIAN-CVE-2026-101918 pyjwt
- Ubuntu UBUNTU-CVE-2026-101918 pyjwt
References
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- package pypi.org
- web github.com
- web github.com
- web github.com