Vulnerability · Published Sep 28, 2026 · Assigned by GitHub_M
CVE-2026-102273PyJWT accepts public JWK containers as HMAC secrets
High 7.4
In plain English
A high-severity security flaw in pyjwt from jpadilla. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 7% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:13 | pyjwt | no fix listed | DEBIAN-CVE-2026-102273 |
| Debian:14 | pyjwt | 2.14.0-1 | DEBIAN-CVE-2026-102273 |
| PyPI | pyjwt | 2.14.0 | GHSA-w2cx-738m-mc7w |
| PyPI | pyjwt | 2.14.0 | PYSEC-2026-4151 |
| Ubuntu:22.04:LTS | pyjwt | 2.3.0-1ubuntu0.5 | USN-8916-1 |
| Ubuntu:22.04:LTS | pyjwt | 2.3.0-1ubuntu0.5 | UBUNTU-CVE-2026-102273 |
| Ubuntu:24.04:LTS | pyjwt | 2.7.0-1ubuntu0.3 | USN-8916-1 |
| Ubuntu:24.04:LTS | pyjwt | 2.7.0-1ubuntu0.3 | UBUNTU-CVE-2026-102273 |
| Ubuntu:26.04:LTS | pyjwt | 2.10.1-4ubuntu1.2 | USN-8916-1 |
| Ubuntu:26.04:LTS | pyjwt | 2.10.1-4ubuntu1.2 | UBUNTU-CVE-2026-102273 |
| Ubuntu:26.10 | pyjwt | 2.13.0-1ubuntu1 | UBUNTU-CVE-2026-102273 |
| Ubuntu:26.10 | pyjwt | 2.13.0-1ubuntu1 | USN-8916-2 |
Affected products (as reported)
Weakness: CWE-347 · Vector: 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 x_refsource_CONFIRM
- https://github.com/jpadilla/pyjwt/commit/801cd128528c62d9b23fcd161d1a2e1c17982f95 x_refsource_MISC
- https://github.com/jpadilla/pyjwt/releases/tag/2.14.0 x_refsource_MISC