CVE-2026-102273
HIGH 7.4CVSS 3.1PyJWT accepts public JWK containers as HMAC secrets
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.
- Published
- 28 Sep 2026
- Last modified
- 6 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-347
- Also known as
- GHSA-w2cx-738m-mc7wPYSEC-2026-4151
- Sources
- NVDJSONOSV GHSA-w2cx-738m-mc7wJSONOSV PYSEC-2026-4151JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.4 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.4 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N |
| OSV | PyPA | CVSS 3.1 | HIGH 7.4 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | pyjwt_project | pyjwtcpe:2.3:a:pyjwt_project:pyjwt:2.13.0:*:*:*:*:*:*:* |
= 2.13.0 | |
| OSV | PyPI | pyjwt | >= 2.13.0, < 2.14.0 | 2.14.0 |
References
- https://github.com/jpadilla/pyjwt/commit/801cd128528c62d9b23fcd161d1a2e1c17982f95 · Patch, WEB
- https://github.com/jpadilla/pyjwt/releases/tag/2.14.0 · Product, Release Notes, WEB
- https://github.com/jpadilla/pyjwt/security/advisories/GHSA-w2cx-738m-mc7w · Vendor Advisory, 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
History
- 25 Nov 2026 21:21 UTC · NVD: first stored (published 28 Sep 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 1 Oct 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 29 Sep 2026)