CVE-2026-101917
Amplification via repeated unknown JWT kid triggers JWKS refresh on each request.
- CVSS 7.5
- CWE-770
- Resource Management
- Remote
PyJWT is a Python implementation of JSON Web Token standards. Prior to 2.14.0, PyJWT get_signing_key_from_jwt is affected because unknown kid misses force refreshes without a negative cache or minimum refresh interval. This occurs when unauthenticated tokens repeatedly use the same unknown kid or varying kid values absent from the cached JWKS. As a result, each cache miss causes PyJWKClient to refresh the JWKS. Consequently, attacker traffic can amplify outbound requests to the configured JWKS endpoint. This issue is fixed in version 2.14.0.
- CWE
- CWE-770
- CVSS base score
- 7.5
- Published
- 2026-09-28
- OWASP
- A10 Server-Side Request Forgery (SSRF)
- Orthogonal defect classification
- Timing/Serialization
- Code defect classification
- Timing Issues
- Category
- Resource Management
- Subcategory
- Resource Exhaustion
- Accessibility scope
- Remote
- Impact
- Denial of Service (DoS)
- Affected component
- PyJWT
- Fixed by upgrading
- Yes
Solution
Upgrade PyJWT to version 2.14.0 or newer.
Vulnerable code sample
import time
from jwt import PyJWKClient, decode, InvalidTokenError
JWKS_URL = "https://example.com/.well-known/jwks.json"
def verify_token(token: str) -> dict:
# VULNERABLE: each unknown kid forces a JWKS refresh without rate limiting
jwk_client = PyJWKClient(JWKS_URL)
signing_key = jwk_client.get_signing_key_from_jwt(token).key
return decode(token, signing_key, algorithms=["RS256"])Patched code sample
import time
from jwt import PyJWKClient, decode, InvalidTokenError
JWKS_URL = "https://example.com/.well-known/jwks.json"
def verify_token(token: str) -> dict:
# FIX: enable JWKS caching with a minimum refresh interval to limit refreshes
jwk_client = PyJWKClient(JWKS_URL, cache_jwks=True, refresh_interval=300)
signing_key = jwk_client.get_signing_key_from_jwt(token).key
return decode(token, signing_key, algorithms=["RS256"])Published fix
Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.
- Throttle repeated PyJWKClient refreshes (jpadilla/pyjwt)
jwt/jwks_client.py,jwt/jwks_client.py · PyJWKClient.fetch_data,jwt/jwks_client.py · PyJWKClient.get_signing_key,jwt/jwks_client.py · PyJWKClient.get_signing_keys,jwt/jwks_client.py · PyJWKClient.__init__
Cite this entry
@misc{vaitp:cve2026101917,
title = {{Amplification via repeated unknown JWT kid triggers JWKS refresh on each request.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-101917},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-101917/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
