# CVE-2026-102268: PyJWT: Asymmetric-PEM detection bypass: whitespace/line-ending-mutated public keys skip the HS/asymmetric confusion guard

> Attackers can forge HMAC tokens by bypassing asymmetric key detection in PyJWT when applications mix HMAC and asymmetric algorithms.

- **Severity:** Critical 9.1 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 28 Sep 2026
- **Updated:** 29 Sep 2026
- **Also known as:** AZL-104991, CLEANSTART-2026-SE75887, CLEANSTART-2026-YD28238, DEBIAN-CVE-2026-102268, ECHO-e77a-93cd-76e1, GHSA-ffc3-869f-jxw9, MINI-2rwq-fcwm-c89j, MINI-46p8-3qv6-9cw4, MINI-4c4j-r8x9-5r74, MINI-4crp-7vfm-8345, MINI-558v-j7gx-32hc, MINI-6cqv-p97p-9frm, MINI-72hw-jp87-69r4, MINI-7jjr-8crr-q63p, MINI-7rmp-cr9x-69fg, MINI-9h78-rx58-qpqc, MINI-9q44-w2fm-94h3, MINI-9x3g-v8pc-h3c5, MINI-fwf3-f899-rgrm, MINI-g8cg-443x-42gh, MINI-h9vj-hjgv-2hq6, MINI-jm8g-f38r-jqh6, MINI-m6g2-c74f-9cjr, MINI-mg8m-7w5h-h46r, MINI-q3r4-w65q-247v, MINI-qfv2-j68f-xx29, MINI-rhh7-v2jx-qwjc, MINI-v4r4-prg6-h87v, MINI-x5j4-4mcq-88h6, MINI-x6rh-xmwg-r5vm, MINI-xvc8-r77q-h4xr, PYSEC-2026-4145, ROOT-APP-PYPI-CVE-2026-102268, UBUNTU-CVE-2026-102268

## What is CVE-2026-102268?

CVE-2026-102268 is a critical vulnerability in jpadilla pyjwt, published on 28 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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 public-key PEM as raw key bytes. As a result, HMACAlgorithm.prepare_key treats the unrecognized asymmetric public key as an HMAC secret. Consequently, an attacker who knows the public key can forge authenticated HMAC tokens. This issue is fixed in version 2.14.0.

Weakness: CWE-347 (Improper Verification of Cryptographic Signature)

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

3 open source packages ship an affected version, including pyjwt and 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-102268?

Upgrade pyjwt to 2.14.0 or later.

## Is CVE-2026-102268 being exploited?

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

Public exploit code:

- Exploitability PoC for CVE-2026-102-268 (PyJWT Asymmetric-PEM detection bypass). (github_poc): https://github.com/covepseng/cve-2026-102268-poc

## Other vulnerabilities in jpadilla pyjwt

- [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)
- [CVE-2026-102272](https://insights.sbomify.com/CVE-2026-102272/): PyJWT BOM Bypass (high 7.4)

## Fix prompt for AI coding agents

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

What it is: CVE-2026-102268 is a critical vulnerability in jpadilla pyjwt, published on 28 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-102268 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-102268/ (Markdown: https://insights.sbomify.com/CVE-2026-102268/index.md)
```

## Sources

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

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