# CVE-2026-102268: PyJWT: Asymmetric-PEM detection bypass: whitespace/line-ending-mutated public keys skip the HS/asymmetric confusion guard

- Severity: Critical 9.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/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.27%, higher than 20% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-09-28T20:26:13.674Z
- Modified: 2026-10-07T20:25:03.030Z
- Also known as: GHSA-ffc3-869f-jxw9, PYSEC-2026-4145
- Weaknesses: CWE-347
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- jpadilla pyjwt: < 2.14.0
- pyjwt (PyPI): before 2.14.0
- pyjwt_project pyjwt: before 2.14.0

## Every score

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

## References

- <https://github.com/jpadilla/pyjwt/security/advisories/GHSA-ffc3-869f-jxw9> (exploit, vendor-advisory, web)
- <https://github.com/jpadilla/pyjwt/commit/8b4e233a22206b34ec1186e912e75c0b2396ac07> (patch, web)
- <https://github.com/jpadilla/pyjwt/releases/tag/2.14.0> (product, release-notes, 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)

## Sources

- CVE List: [CVE-2026-102268](https://www.cve.org/CVERecord?id=CVE-2026-102268), CVE Terms of Use, modified 2026-09-29
- GitHub Advisory Database: [GHSA-ffc3-869f-jxw9](https://github.com/advisories/GHSA-ffc3-869f-jxw9), CC-BY-4.0, modified 2026-10-01
- NVD: [CVE-2026-102268](https://nvd.nist.gov/vuln/detail/CVE-2026-102268), Public domain, modified 2026-10-07
- PyPA Advisory Database: [PYSEC-2026-4145](https://osv.dev/vulnerability/PYSEC-2026-4145), CC-BY-4.0, modified 2026-10-01

---

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