CVE-2026-102268
CRITICAL 9.1CVSS 3.1PyJWT: Asymmetric-PEM detection bypass: whitespace/line-ending-mutated public keys skip the HS/asymmetric confusion guard
PyJWT is a Python implementation of JSON Web Token standards. Prior to 2.14.0, is_pem_format in jwt/utils.py is affected because is_pem_format does not recognize every PEM representation accepted by the cryptography loader. This occurs when an application mixes HMAC and asymmetric algorithms and supplies a mutated public-key PEM as raw key bytes. As a result, HMACAlgorithm.prepare_key treats the unrecognized asymmetric public key as an HMAC secret. Consequently, an attacker who knows the public key can forge authenticated HMAC tokens. This issue is fixed in version 2.14.0.
- Published
- 28 Sep 2026
- Last modified
- 7 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-347
- Also known as
- GHSA-ffc3-869f-jxw9PYSEC-2026-4145
- Sources
- NVDJSONOSV GHSA-ffc3-869f-jxw9JSONOSV PYSEC-2026-4145JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | CRITICAL 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | CRITICAL 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| OSV | PyPA | CVSS 3.1 | CRITICAL 9.1 | CVSS:3.1/AV:N/AC:L/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.14.0 | 2.14.0 |
| OSV | PyPI | pyjwt | < 2.14.0 | 2.14.0 |
References
- https://github.com/jpadilla/pyjwt/commit/8b4e233a22206b34ec1186e912e75c0b2396ac07 · Patch, WEB
- https://github.com/jpadilla/pyjwt/releases/tag/2.14.0 · Product, Release Notes, WEB
- https://github.com/jpadilla/pyjwt/security/advisories/GHSA-ffc3-869f-jxw9 · Exploit, Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-102268 · ADVISORY
- https://github.com/jpadilla/pyjwt · PACKAGE
- https://pypi.org/project/pyjwt · PACKAGE
- https://github.com/advisories/GHSA-ffc3-869f-jxw9 · 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:11 UTC · OSV: first stored (published 29 Sep 2026)