# CVE-2026-102273: PyJWT accepts public JWK containers as HMAC secrets

> Attackers can forge JWT tokens with arbitrary claims by exploiting HMAC key validation flaws in PyJWT when mixed algorithms are enabled.

- **Severity:** High 7.4 (`CVSS:3.1/AV:N/AC:H/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-105227, CLEANSTART-2026-FP98505, CLEANSTART-2026-TY25430, DEBIAN-CVE-2026-102273, ECHO-aa39-5d33-5a5c, GHSA-w2cx-738m-mc7w, MINI-2qxv-3r49-m78r, MINI-4r98-484w-8wxh, MINI-6g96-pp3q-gc35, MINI-8256-h5f7-xj2v, MINI-9j9h-f78m-qm47, MINI-cmj2-p93g-28f4, MINI-gm29-ghrw-gxc4, MINI-hx4v-ccvf-3gjr, MINI-j97q-jf9m-vg23, MINI-m2gp-87rg-985h, MINI-m3hq-chwm-j88f, MINI-p37h-x6r3-g2h9, MINI-rqw7-99jr-x4p2, MINI-wq6m-h4jw-4q68, PYSEC-2026-4151, ROOT-APP-PYPI-CVE-2026-102273, UBUNTU-CVE-2026-102273

## What is CVE-2026-102273?

CVE-2026-102273 is a high-severity authentication bypass 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. From 2.13.0 until 2.14.0, PyJWT HMACAlgorithm.prepare_key is affected because HMAC key guard only recognizes top-level public JWK forms and misses container representations. This occurs when an application allows HMAC and asymmetric algorithms and passes a public JWK container as the raw key. As a result, public asymmetric key material is accepted as the HMAC secret. Consequently, an attacker who knows the public key can forge a token with arbitrary authenticated claims. This issue is fixed in version 2.14.0.

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

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

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `pyjwt` | PyPI | From 2.13.0 | 2.14.0 |
| `pyjwt` | PyPI | From 2.13.0 | 2.14.0 |
| `PyJWT` | PyPI | From 2.13.0 | 2.14.0 |

Products: Pyjwt Project Pyjwt.

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

Upgrade pyjwt to 2.14.0 or later.

## Is CVE-2026-102273 being exploited?

There is no known exploitation of CVE-2026-102273 in the wild and no public exploit code.

## 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-102273 and fix it if it is affected.

What it is: CVE-2026-102273 is a high-severity authentication bypass 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: There is no known exploitation of CVE-2026-102273 in the wild and no public exploit code.

Affected packages and fixed versions:
- pyjwt (PyPI): affected from 2.13.0; fixed in 2.14.0
- pyjwt (PyPI): affected from 2.13.0; fixed in 2.14.0
- PyJWT (PyPI): affected from 2.13.0; 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-102273/ (Markdown: https://insights.sbomify.com/CVE-2026-102273/index.md)
```

## Sources

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

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