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 products
pyjwt_project: pyjwt
References4
- github.com/jpadilla/pyjwt/security/advisories/GHSA-jwrc-g2q2-pq… ExploitPatchVendor Advisory
- github.com/jpadilla/pyjwt/security/advisories/GHSA-jwrc-g2q2-pq… ExploitPatchVendor Advisory
- github.com/jpadilla/pyjwt/commit/8b4e233a22206b34ec1186e912e75c… Patch
- github.com/jpadilla/pyjwt/releases/tag/2.14.0 ProductRelease Notes
Metrics
- CVSS 3.1
-
4.9
MEDIUM
Score source: NVD
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H - EPSS — exploit probability
- 0% percentile: 16 · as of 9 November 2026
- CWE
- CWE-1333
Could this be exploited in your environment?
A patch closes the known hole. A penetration test shows what an attacker can still reach — with proof.