CVE-2026-102270 · GHSA-jwrc-g2q2-pq5p
PyJWT: ReDoS vulnerability when calling the `is_pem_format` function.
- Risk score
- 42/100
- CVSS
- 4.9 v3.1
- Exploit chance (30 days)
- 0.2%
- Published
- 28 Sep 2026
Open in the live forecast Today's forecast
What to know
- What it is
- 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 unbound…
- Affected
- pyjwt (pip) <= 2.13.0
- Fix
- Upgrade pyjwt to 2.14.0 or later.
- Exploitation
- Public proof of concept
Story map
At a glance
PyJWT: Amber, patch this week. PyJWT is a Python implementation of JSON Web Token standards. Prior to 2.14.0, is_pem_format in jwt/utils.py is affected because is_pem_format does not recognize every PEM representation accepted by the cryptography loader. This occurs when an application mixes HMAC and asymmetric algorithms and supplies a mutated pub…
The flaws
- CVE-2026-102270: PyJWT: ReDoS vulnerability when calling the `is_pem_format` function. (CVSS 4.9 · EPSS 0%)
- CVE-2026-102268: Asymmetric-PEM detection bypass: whitespace/line-ending-mutated public keys skip the HS/asymmetric confusion guard (CVSS 9.1 · EPSS 0%)
- CVE-2026-102266: PyJWK accepts empty HMAC keys, bypassing PyJWT's empty-key validation (CVSS 9.1 · EPSS 0%)
- CVE-2026-101917: PyJWT: PyJWKClient still amplifies unauthenticated JWKS fetches on unknown kid values (incomplete fix of CVE-2026-48524) (CVSS 7.5 · EPSS 0%)
The fix
Upgrade PyJWT: 2.14.0 or later on your release line
Who is exposed: PyJWT (pip) <= 2.13.0
Where it stands
- Public proof of concept
Connects to
- Same weakness: CWE-1333 (CWE-1333). 43 other warnings in 30 days
- Same product: Earlier pyjwt warnings. 10 in the last 90 days
Why it is Yellow
- CVSS 4.9 medium
- Public exploit or proof of concept referenced
- On your watchlist: PyPI
Affected packages
| Package | Ecosystem | Vulnerable | Fixed in |
|---|---|---|---|
| pyjwt | pip | <= 2.13.0 | 2.14.0 |
References
- https://github.com/advisories/GHSA-jwrc-g2q2-pq5p
- https://github.com/jpadilla/pyjwt/security/advisories/GHSA-jwrc-g2q2-pq5p
- https://nvd.nist.gov/vuln/detail/CVE-2026-102270
- https://github.com/jpadilla/pyjwt/commit/8b4e233a22206b34ec1186e912e75c0b2396ac07
- https://github.com/jpadilla/pyjwt/releases/tag/2.14.0
- https://github.com/advisories/GHSA-jwrc-g2q2-pq5p
Original 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.
Last activity 28 Sep 2026. Patch Forecast updates every hour.