CVE-2026-48524: Pyjwt Denial of Service Vulnerability

LOW
Advisory Identifier: GHSA-fhv5-28vv-h8m8
CVSS 3.7
CWE-755 CWE-460
Published
Advisory Summary

CVE-2026-48524 is a LOW (CVSS 3.7) denial of service vulnerability (CWE-755: Improper Handling of Exceptional Conditions) affecting Pyjwt libraries in the PyPI ecosystem. The issue involves pyjwkclient unbounded jwks endpoint requests via attacker-controlled kid values (dos). Remediation is available by upgrading affected packages to version 2.13.0.

CVE-2026-48524 at a Glance

CVE Identifier CVE-2026-48524
GHSA Identifier GHSA-fhv5-28vv-h8m8
Severity LOW
CVSS v3.1 Base Score 3.7
CWE Classification CWE-755: Improper Handling of Exceptional Conditions
Affected Product Pyjwt
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 3.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2026-48524

To remediate this vulnerability, upgrade all affected Pyjwt dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

pyjwt fixed: 2.13.0
pip install pyjwt>=2.13.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show pyjwt

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-48524, inspect your installed packages using pip:

pip show pyjwt

Analyze the terminal output to locate any version of Pyjwt in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.13.0), your application is affected.

Note: The pip show pyjwt command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-755: Improper Handling of Exceptional Conditions, where the product does not handle or incorrectly handles an exceptional condition. In Pyjwt, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

> [!NOTE] > 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. ## Summary 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. Additionally, fetch_data() finally block clears the JWKS cache on network error. ## Root Cause jwt/jwks_client.py:172-198 - get_signing_key(kid) calls get_signing_keys(refresh=True) for unknown kids, bypassing TTL cache with no cooldown. jwt/jwks_client.py:120-122 - finally block writes None to cache on error, clearing valid data. ## Impact - DoS against JWKS endpoint (unlimited requests per invalid token) - DoS against application (network I/O latency) - Cascading failure (rate limiting clears cache, breaking legitimate auth) ## Suggested Fix 1. Add refresh cooldown (refuse refresh more than once per TTL period) 2. Move cache write from finally to else block ## Affected Versions All versions with PyJWKClient (2.4.0 through 2.12.1)

CVE-2026-48524 Affected Pyjwt Versions

1 component(s)
Fixed Versions:
2.13.0
Product / Package Ecosystem Affected Versions Fixed Version
pyjwt
PyPI
≥ 2.0.0
< 2.13.0
2.13.0

References

Frequently Asked Questions

What is CVE-2026-48524?
CVE-2026-48524 is a security vulnerability in Pyjwt involving PyJWKClient unbounded JWKS endpoint requests via attacker-controlled kid values (DoS) under CWE-755: Improper Handling of Exceptional Conditions.
Which Pyjwt versions are affected?
Affected versions include releases prior to 2.13.0 across affected packages: pyjwt.
What version fixes CVE-2026-48524?
Upgrading to 2.13.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pyjwt affected?
Yes, pyjwt is affected in releases prior to 2.13.0. Upgrade your dependency to 2.13.0 or later.
What is the CVSS score of CVE-2026-48524?
CVE-2026-48524 has a CVSS v3.1 base score of 3.7 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2026-48524?
CVE-2026-48524 is classified under CWE-755: Improper Handling of Exceptional Conditions (The product does not handle or incorrectly handles an exceptional condition.).
How can I check PyPI dependencies for CVE-2026-48524?
Run the dependency tree command: 'pip show pyjwt'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-fhv5-28vv-h8m8",
  "modified" : "2026-07-31T22:13:02Z",
  "published" : "2026-06-15T17:28:46Z",
  "aliases" : [ "CVE-2026-48524" ],
  "summary" : "PyJWKClient unbounded JWKS endpoint requests via attacker-controlled kid values (DoS)",
  "details" : "> [!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)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "pyjwt"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.13.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.12.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/jpadilla/pyjwt/security/advisories/GHSA-fhv5-28vv-h8m8"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-48524"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/github/advisory-database/pull/8522"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jpadilla/pyjwt"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pyjwt/PYSEC-2026-177.yaml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-460", "CWE-755" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-15T17:28:46Z",
    "nvd_published_at" : "2026-05-28T16:16:29Z"
  }
}