{"id":"CVE-2026-48524","aliases":["CVE-2026-48524","GHSA-fhv5-28vv-h8m8","PYSEC-2026-177"],"related":[],"kind":"vulnerability","state":"published","title":"PyJWT: PyJWKClient unbounded JWKS endpoint requests via attacker-controlled kid values (DoS)","summary":"PyJWT is a JSON Web Token implementation in Python. Prior to 2.13.0, PyJWKClient.get_signing_key() forces a fresh HTTP request to the JWKS endpoint for every JWT with an unknown kid value, with no rate limiting. Since kid comes from the unverified token header, an attacker can trigger unlimited outbound requests. The vulnerability surfaces only when a JWKS fetch fails; an attacker can attempt to provoke that with sustained unknown-kid traffic, but the outcome depends on upstream JWKS-endpoint behavior (rate limiting, transient errors) which is beyond the attacker's control. This vulnerability is fixed in 2.13.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"PyJWT is a JSON Web Token implementation in Python. Prior to 2.13.0, PyJWKClient.get_signing_key() forces a fresh HTTP request to the JWKS endpoint for every JWT with an unknown kid value, with no rate limiting. Since kid comes from the unverified token header, an attacker can trigger unlimited outbound requests. The vulnerability surfaces only when a JWKS fetch fails; an attacker can attempt to provoke that with sustained unknown-kid traffic, but the outcome depends on upstream JWKS-endpoint behavior (rate limiting, transient errors) which is beyond the attacker's control. This vulnerability is fixed in 2.13.0.","source":"cvelist"},{"lang":"en","text":"> [!NOTE]\n>  The vulnerability surfaces only when a JWKS fetch fails; an attacker can attempt to provoke that with sustained unknown-kid traffic, but the outcome depends on upstream JWKS-endpoint behavior (rate limiting, transient errors) which is beyond the attacker's control. Impact is reduced auth availability until the next successful fetch, not complete denial of service.\n\n## Summary\nPyJWKClient.get_signing_key() forces a fresh HTTP request to the JWKS endpoint for every JWT with an unknown kid value, with no rate limiting. Since kid comes from the unverified token header, an attacker can trigger unlimited outbound requests.\n\nAdditionally, fetch_data() finally block clears the JWKS cache on network error.\n\n## Root Cause\njwt/jwks_client.py:172-198 - get_signing_key(kid) calls get_signing_keys(refresh=True) for unknown kids, bypassing TTL cache with no cooldown.\njwt/jwks_client.py:120-122 - finally block writes None to cache on error, clearing valid data.\n\n## Impact\n- DoS against JWKS endpoint (unlimited requests per invalid token)\n- DoS against application (network I/O latency)\n- Cascading failure (rate limiting clears cache, breaking legitimate auth)\n\n## Suggested Fix\n1. Add refresh cooldown (refuse refresh more than once per TTL period)\n2. Move cache write from finally to else block\n\n## Affected Versions\nAll versions with PyJWKClient (2.4.0 through 2.12.1)","format":"markdown","source":"ghsa"},{"lang":"es","text":"PyJWT es una implementación de JSON Web Token en Python. Antes de la versión 2.13.0, PyJWKClient.get_signing_key() fuerza una nueva solicitud HTTP al endpoint JWKS para cada JWT con un valor kid desconocido, sin limitación de tasa. Dado que kid proviene del encabezado del token no verificado, un atacante puede desencadenar solicitudes salientes ilimitadas. La vulnerabilidad solo se manifiesta cuando una obtención de JWKS falla; un atacante puede intentar provocar eso con tráfico sostenido de kid desconocido, pero el resultado depende del comportamiento del endpoint JWKS ascendente (limitación de tasa, errores transitorios) lo cual está fuera del control del atacante. Esta vulnerabilidad está corregida en la versión 2.13.0.","source":"nvd"}],"published":"2026-05-28T15:07:35.162Z","modified":"2026-10-26T13:10:00.140Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","score":3.7,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","score":3.7,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","score":3.7,"rating":"LOW"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","score":3.7,"rating":"LOW"}],"cwes":["CWE-460","CWE-755"],"affected":[{"ranges":[{"version":"< 2.13.0","status":"affected"}],"vendor":"jpadilla","product":"pyjwt","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"2.0.0","status":"affected","fixed":"2.13.0"}],"ecosystem":"PyPI","package":"pyjwt","purl":"pkg:pypi/pyjwt","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.13.0"}],"vendor":"pyjwt_project","product":"pyjwt","cpe":"cpe:2.3:a:pyjwt_project:pyjwt:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.13.0"}],"ecosystem":"PyPI","package":"pyjwt","purl":"pkg:pypi/pyjwt","source":"pysec"}],"references":[{"url":"https://github.com/jpadilla/pyjwt/security/advisories/GHSA-fhv5-28vv-h8m8","tags":["advisory","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-48524","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/github/advisory-database/pull/8522","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/jpadilla/pyjwt","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/pyjwt/PYSEC-2026-177.yaml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-05-28T19:16:33.339Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-48524","url":"https://www.cve.org/CVERecord?id=CVE-2026-48524","licence":"CVE Terms of Use","modified":"2026-05-28T19:17:11.798Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-fhv5-28vv-h8m8","url":"https://github.com/advisories/GHSA-fhv5-28vv-h8m8","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:49.375Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-48524","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-48524","licence":"Public domain","modified":"2026-10-26T13:10:00.140Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-177","url":"https://osv.dev/vulnerability/PYSEC-2026-177","licence":"CC-BY-4.0","modified":"2026-06-02T12:15:10.363Z"}],"updatedAt":"2026-11-25T22:59:22.940Z","epss":{"score":0.004,"percentile":0.36364,"date":"2026-12-01T12:00:22.000Z"}}