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

- Severity: High 7.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.18%, higher than 7% of CVEs (2026-12-01)
- Published: 2026-09-28T20:38:28.161Z
- Modified: 2026-10-06T18:29:42.883Z
- Also known as: GHSA-w2cx-738m-mc7w, PYSEC-2026-4151
- Weaknesses: CWE-347
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- jpadilla pyjwt: >= 2.13.0, < 2.14.0
- pyjwt (PyPI): from 2.13.0 before 2.14.0
- pyjwt_project pyjwt: 2.13.0

## Every score

- GitHub_M: CVSS:3.1 7.4 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N`
- GitHub: CVSS:3.1 7.4 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N`
- PyPA Advisory Database: CVSS:3.1 7.4 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N`

## References

- <https://github.com/jpadilla/pyjwt/security/advisories/GHSA-w2cx-738m-mc7w> (vendor-advisory, web)
- <https://github.com/jpadilla/pyjwt/commit/801cd128528c62d9b23fcd161d1a2e1c17982f95> (patch, web)
- <https://github.com/jpadilla/pyjwt/releases/tag/2.14.0> (product, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-102273> (advisory)
- <https://github.com/jpadilla/pyjwt> (package)
- <https://pypi.org/project/pyjwt> (package)
- <https://github.com/advisories/GHSA-w2cx-738m-mc7w> (advisory)

## Sources

- CVE List: [CVE-2026-102273](https://www.cve.org/CVERecord?id=CVE-2026-102273), CVE Terms of Use, modified 2026-09-29
- GitHub Advisory Database: [GHSA-w2cx-738m-mc7w](https://github.com/advisories/GHSA-w2cx-738m-mc7w), CC-BY-4.0, modified 2026-10-01
- NVD: [CVE-2026-102273](https://nvd.nist.gov/vuln/detail/CVE-2026-102273), Public domain, modified 2026-10-06
- PyPA Advisory Database: [PYSEC-2026-4151](https://osv.dev/vulnerability/PYSEC-2026-4151), CC-BY-4.0, modified 2026-10-01

---

Page: https://cve.day/CVE-2026-102273 · Whole record: https://cve.day/CVE-2026-102273.json · Rebuilt by cve.day 2026-11-25T22:59:41.390Z
