# CVE-2026-102270: PyJWT: ReDoS vulnerability when calling the `is_pem_format` function.

> An attacker can cause excessive CPU consumption and denial of service in applications using PyJWT by providing malformed PEM-like input.

- **Severity:** Medium 4.4 (`CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 28 Sep 2026
- **Updated:** 29 Sep 2026
- **Also known as:** AZL-104988, CLEANSTART-2026-IP96561, CLEANSTART-2026-JF42627, DEBIAN-CVE-2026-102270, ECHO-629d-f198-695f, GHSA-jwrc-g2q2-pq5p, MINI-24xg-9g35-g9p6, MINI-2gv9-hjgv-9pv9, MINI-42mf-52j2-g8jg, MINI-442g-7vr8-pm7p, MINI-5p6j-h6g8-5pch, MINI-7mw3-252h-f5vv, MINI-9393-9gfp-57wj, MINI-c64x-xw2r-j3wq, MINI-cf8w-rhcp-wq3g, MINI-crvw-gccv-3584, MINI-f8r7-xxr2-ghmg, MINI-fj78-pmw5-whm8, MINI-g3c8-gwq7-2x4q, MINI-g6j5-3cx5-8vwj, MINI-gpgv-m9fq-pqf4, MINI-hg7m-j745-ph24, MINI-hgjf-729q-qvrp, MINI-hx9q-wqq7-9q6p, MINI-j9pv-5536-j27w, MINI-jx65-2653-rmjh, MINI-m43h-mcfq-6fxr, MINI-r4jv-p8cc-hw44, MINI-rm7q-cvjj-7p5j, MINI-v3vq-r7wq-7xg3, MINI-xcg2-mvjp-r4x5, PYSEC-2026-4148, UBUNTU-CVE-2026-102270

## What is CVE-2026-102270?

CVE-2026-102270 is a medium-severity denial of service vulnerability in jpadilla pyjwt, published on 28 Sep 2026. An attacker needs administrator access to exploit it, with no action from the victim.

### 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.

Weakness: CWE-1333 (Inefficient Regular Expression Complexity)

## Which versions are affected by CVE-2026-102270?

3 open source packages ship an affected version, including pyjwt. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `pyjwt` | PyPI | All versions | 2.14.0 |
| `pyjwt` | PyPI | All versions | 2.14.0 |
| `pyjwt` | PyPI | All versions | 2.14.0 |

Products: Pyjwt Project Pyjwt.

## How do I fix CVE-2026-102270?

Upgrade pyjwt to 2.14.0 or later.

## Is CVE-2026-102270 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-102270 exists.

## Other vulnerabilities in jpadilla pyjwt

- [CVE-2026-102268](https://insights.sbomify.com/CVE-2026-102268/): PyJWT: Asymmetric-PEM detection bypass: whitespace/line-ending-mutated public keys skip the HS/asymmetric confusion guard (critical 9.1)
- [CVE-2026-32597](https://insights.sbomify.com/CVE-2026-32597/): PyJWT accepts unknown `crit` header extensions (RFC 7515 §4.1.11 MUST violation) (high 7.5)
- [CVE-2026-102266](https://insights.sbomify.com/CVE-2026-102266/): PyJWK accepts empty HMAC keys, bypassing PyJWT's empty-key validation (high 7.4)
- [CVE-2026-102267](https://insights.sbomify.com/CVE-2026-102267/): PyJWT: PyJWKClient follows redirects when fetching JWKS (high 7.4)
- [CVE-2026-102271](https://insights.sbomify.com/CVE-2026-102271/): PyJWT: Public keys in DER form are accepted as HMAC secrets, bypassing the CVE-2022-29217 guard (high 7.4)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-102270 and fix it if it is affected.

What it is: CVE-2026-102270 is a medium-severity denial of service vulnerability in jpadilla pyjwt, published on 28 Sep 2026. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-102270 exists.

Affected packages and fixed versions:
- pyjwt (PyPI): affected all versions; fixed in 2.14.0
- pyjwt (PyPI): affected all versions; fixed in 2.14.0
- pyjwt (PyPI): affected all versions; fixed in 2.14.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-102270/ (Markdown: https://insights.sbomify.com/CVE-2026-102270/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-102270
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-102270
- OSV: https://osv.dev/vulnerability/CVE-2026-102270

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-102270/
Summaries are generated and may contain mistakes; the official description above is the record.
