Description
PyJWT is a Python implementation of JSON Web Token standards. Prior to 2.14.0, PyJWT is_pem_format is affected because lazy PEM regular expression backtracks extensively. This occurs when a certificate-like input contains repeated BEGIN markers without a matching END marker. As a result, is_pem_format performs unbounded backtracking while searching for a PEM end marker. Consequently, an attacker can cause intensive CPU consumption. This issue is fixed in version 2.14.0.
Published: 2026-09-28
Score: 4.4 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service (CPU exhaustion)
Action: Immediate Patch
AI Analysis

Impact

The vulnerability exists in the is_pem_format function of PyJWT. A crafted string containing multiple repeated BEGIN markers without a matching END marker triggers excessive backtracking in a lazy PEM regular expression, causing the function to consume excessive CPU time. This results in a denial-of-service condition that can be exploited by an attacker who can supply such input to the application.

Affected Systems

Affected versions of PyJWT are those prior to 2.14.0, known for the jpadilla:pyjwt package. Systems that rely on this package for JWT validation or certificate parsing are at risk, including any Python web services or applications that import PyJWT directly. The issue is fixed in PyJWT 2.14.0 and later.

Risk and Exploitability

The CVSS score for this vulnerability is 4.4, indicating a moderate severity. No EPSS score is available, and the vulnerability is not present in the CISA KEV list. Attackers must be able to cause the application to call is_pem_format with a malicious string; the actual vector depends on how the application handles JWTs. The impact is primarily resource exhaustion, leading to a denial of service of the affected process.

Generated by OpenCVE AI on September 28, 2026 at 21:21 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade PyJWT to version 2.14.0 or later, where the regex has been rewritten to avoid excessive backtracking.
  • If an upgrade is not currently possible, enforce input validation by checking that any PEM-like string contains no more than one BEGIN marker and a matching END marker, and reject malformed strings before calling is_pem_format.
  • Apply resource limiting to Python processes using PyJWT, such as setting CPU limits or running the JWT parsing code in a sandbox, to prevent a single request from exhausting system resources.

Generated by OpenCVE AI on September 28, 2026 at 21:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-jwrc-g2q2-pq5p PyJWT: ReDoS vulnerability when calling the `is_pem_format` function.
History

Tue, 06 Oct 2026 19:00:00 +0000

Type Values Removed Values Added
First Time appeared Pyjwt Project
Pyjwt Project pyjwt
CPEs cpe:2.3:a:pyjwt_project:pyjwt:*:*:*:*:*:*:*:*
Vendors & Products Pyjwt Project
Pyjwt Project pyjwt

Tue, 29 Sep 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 29 Sep 2026 13:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Moderate


Mon, 28 Sep 2026 22:30:00 +0000

Type Values Removed Values Added
First Time appeared Jpadilla
Jpadilla pyjwt
Vendors & Products Jpadilla
Jpadilla pyjwt

Mon, 28 Sep 2026 20:45:00 +0000

Type Values Removed Values Added
Description PyJWT is a Python implementation of JSON Web Token standards. Prior to 2.14.0, PyJWT is_pem_format is affected because lazy PEM regular expression backtracks extensively. This occurs when a certificate-like input contains repeated BEGIN markers without a matching END marker. As a result, is_pem_format performs unbounded backtracking while searching for a PEM end marker. Consequently, an attacker can cause intensive CPU consumption. This issue is fixed in version 2.14.0.
Title PyJWT: ReDoS vulnerability when calling the `is_pem_format` function.
Weaknesses CWE-1333
References
Metrics cvssV3_1

{'score': 4.4, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H'}


Subscriptions

Jpadilla Pyjwt
Pyjwt Project Pyjwt
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-09-29T19:36:54.944Z

Reserved: 2026-09-28T20:11:16.658Z

Link: CVE-2026-102270

cve-icon Vulnrichment

Updated: 2026-09-29T19:36:47.026Z

cve-icon NVD

Status : Analyzed

Published: 2026-09-28T21:17:14.943

Modified: 2026-10-06T18:46:19.343

Link: CVE-2026-102270

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-09-28T20:29:24Z

Links: CVE-2026-102270 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-09-28T22:15:08Z

Weaknesses
  • CWE-1333

    Inefficient Regular Expression Complexity