CVE-2026-102272
published 2026-09-28CVE-2026-102272: PyJWT is a Python implementation of JSON Web Token standards. From 2.13.0 until 2.14.0, HMACAlgorithm.prepare_key in jwt/algorithms.py is affected because…
PriorityP345high7.4CVSS 3.1
AVNACHPRNUINSUCHIHAN
EPSS
0.22%
12.0th percentile
PyJWT is a Python implementation of JSON Web Token standards. From 2.13.0 until 2.14.0, HMACAlgorithm.prepare_key in jwt/algorithms.py is affected because raw-JWK detector does not normalize accepted Unicode byte-order marks before checking for JSON. This occurs when a public JWK is prefixed with a UTF-8 BOM and used in a mixed-algorithm verification path. As a result, public JWK bypasses asymmetric-key detection and becomes the HMAC secret. Consequently, an attacker who knows the public key can forge authenticated tokens. This issue is fixed in version 2.14.0.
Affected
4 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| jpadilla | pyjwt | — | — |
| pyjwt_project | pyjwt | — | — |
| pyjwt_project | pyjwt | >= 2.13.0 < 2.14.0 | 2.14.0 |
| ubuntu | pyjwt | — | — |
CVSS provenance
nvdv3.17.4HIGHCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
ghsa7.4HIGH
vendor_ubuntu9.1CRITICAL
vendor_redhat7.4HIGH
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
PyJWT BOM Bypass
ghsa·2026-09-29·CVSS 7.4
CVE-2026-102272 [HIGH] CWE-347 PyJWT BOM Bypass
PyJWT BOM Bypass
## Affected Package
- **Package**: PyJWT (`pyjwt` on PyPI)
- **Repository**: https://www.google.com/url?q=https://github.com/jpadilla/pyjwt&source=gmail&ust=1781794518474000&sa=E
- **Affected version**: 2.13.0
- **Vulnerability class**: Algorithm confusion / patch bypass
---
## Root Cause
PyJWT 2.13.0 introduced a guard in `HMACAlgorithm.prepare_key()` (file `jwt/algorithms.py`, approximately line 344) to prevent RSA public key material from being used as an HMAC secret — the root cause of CVE-2026-48526.
The guard uses `bytes.lstrip()` before calling `startswith(b"{")`:
```python
stripped = key_bytes.lstrip() # strips ASCII whitespace only
if stripped.startswith(b"{"): # JWK detection
...
raise InvalidKeyError("The specified key is an asymmetric key...")
```
`byte
VulDB
jpadilla PyJWT up to 2.13.x raw-JWK detector jwt/algorithms.py HMACAlgorithm.prepare_key improper authentication
vuldb·2026-09-28·CVSS 7.4
CVE-2026-102272 [HIGH] jpadilla PyJWT up to 2.13.x raw-JWK detector jwt/algorithms.py HMACAlgorithm.prepare_key improper authentication
A vulnerability marked as critical has been reported in jpadilla PyJWT up to 2.13.x. Affected by this vulnerability is the function HMACAlgorithm.prepare_key of the file jwt/algorithms.py of the component raw-JWK detector. The manipulation leads to improper authentication.
This vulnerability is documented as CVE-2026-102272. The attack can be initiated remotely. There is not any exploit available.
It is suggested to upgrade the affected component.
Ubuntu
PyJWT vulnerabilities
vendor_ubuntu·2026-10-15·CVSS 9.1
CVE-2026-102268 [CRITICAL] PyJWT vulnerabilities
Title: PyJWT vulnerabilities
Summary: Several security issues were fixed in PyJWT.
USN-8916-1 fixed vulnerabilities in PyJWT. This update provides the
corresponding fix for PyJWT on Ubuntu 26.10.
Original advisory details:
YuSung Han discovered that PyJWT did not properly validate certain JWK keys
when performing HMAC verification. An attacker could possibly use this
issue to forge authentication tokens. (CVE-2026-102266)
Rohan Das discovered that PyJWT incorrectly handled redirects when fetching
key sets. A remote attacker could possibly use this issue to cause PyJWT
to disclose sensitive information. (CVE-2026-102267)
It was discovered that PyJWT incorrectly recognized certain PEM
representations. An attacker who knew the public key could possibly use
this issue to forge authentica
Ubuntu
PyJWT vulnerabilities
vendor_ubuntu·2026-10-13·CVSS 9.1
CVE-2026-102267 [CRITICAL] PyJWT vulnerabilities
Title: PyJWT vulnerabilities
Summary: Several security issues were fixed in PyJWT.
YuSung Han discovered that PyJWT did not properly validate certain JWK keys
when performing HMAC verification. An attacker could possibly use this
issue to forge authentication tokens. This issue only affected Ubuntu
26.04 LTS. (CVE-2026-102266)
Rohan Das discovered that PyJWT incorrectly handled redirects when fetching
key sets. A remote attacker could possibly use this issue to cause PyJWT
to disclose sensitive information. This issue only affected Ubuntu 22.04
LTS, Ubuntu 24.04 LTS, Ubuntu 26.04 LTS. (CVE-2026-102267)
It was discovered that PyJWT incorrectly recognized certain PEM
representations. An attacker who knew the public key could possibly use
this issue to forge authentication tokens. This is
Red Hat
pyjwt: pyjwt: Token forgery via improper Unicode byte-order mark handling
vendor_redhat·2026-09-28·CVSS 7.4
CVE-2026-102272 [HIGH] CWE-347 pyjwt: pyjwt: Token forgery via improper Unicode byte-order mark handling
pyjwt: pyjwt: Token forgery via improper Unicode byte-order mark handling
PyJWT is a Python implementation of JSON Web Token standards. From 2.13.0 until 2.14.0, HMACAlgorithm.prepare_key in jwt/algorithms.py is affected because raw-JWK detector does not normalize accepted Unicode byte-order marks before checking for JSON. This occurs when a public JWK is prefixed with a UTF-8 BOM and used in a mixed-algorithm verification path. As a result, public JWK bypasses asymmetric-key detection and becomes the HMAC secret. Consequently, an attacker who knows the public key can forge authenticated tokens. This issue is fixed in version 2.14.0.
A flaw was found in pyjwt. When verifying cryptographic keys, the raw JSON Web Key (JWK) parser fails to normalize Unicode byte-order marks (BOM). In mixed-
No detection rules found.
No public exploits indexed.
2026-09-28
Published