Vulnerability · Published Sep 28, 2026 · Assigned by GitHub_M
CVE-2026-102270PyJWT: ReDoS vulnerability when calling the `is_pem_format` function.
Medium 4.4
In plain English
A medium-severity regular-expression denial of service in pyjwt from jpadilla. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 16% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | pyjwt | no fix listed | DEBIAN-CVE-2026-102270 |
| Debian:13 | pyjwt | no fix listed | DEBIAN-CVE-2026-102270 |
| Debian:14 | pyjwt | 2.14.0-1 | DEBIAN-CVE-2026-102270 |
| PyPI | pyjwt | 2.14.0 | GHSA-jwrc-g2q2-pq5p |
| PyPI | pyjwt | 2.14.0 | PYSEC-2026-4148 |
| Ubuntu:26.10 | pyjwt | no fix listed | UBUNTU-CVE-2026-102270 |
Affected products (as reported)
Weakness: CWE-1333 · Vector: CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H
References
- https://github.com/jpadilla/pyjwt/security/advisories/GHSA-jwrc-g2q2-pq5p x_refsource_CONFIRM
- https://github.com/jpadilla/pyjwt/commit/8b4e233a22206b34ec1186e912e75c0b2396ac07 x_refsource_MISC
- https://github.com/jpadilla/pyjwt/releases/tag/2.14.0 x_refsource_MISC