PyJWT
PyJWT: 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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 2.14.0
Fixed in 2.14.0
Mitigation
Upgrade pyjwt to 2.14.0 or later.
References
- Vendor advisory github.com/jpadilla/pyjwt/security/advisories/…
- Patch github.com/jpadilla/pyjwt/commit/8b4e233a22206…
- Release notes github.com/jpadilla/pyjwt/releases/tag/2.14.0
Timeline
Days relative to CVE publicationFirst public PoC 3.7 days after publication; not in CISA KEV. First PoC: covepseng/cve-2026-102268-poc (created 2 Oct 2026, found by us: backfilled).
PoC repositories
Found on GitHub.1 PoCs · 1 pending
PoCs 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| covepseng/cve-2026-102268-poc | 2 Oct 2026 +3.7 d | 0 | PoC |
Pending 1
| Repository | Created | Found by us | Stars | Assessment |
|---|---|---|---|---|
| federiconbaez/cortex9-pyjwt-pem-detection-alg-confusion-model | 9 Nov 2026 +42 d | 14 Nov 2026 | 0 | Pending |
Only PoCs count toward the first-PoC date and the characteristics below. "Backfilled" means we found the repository more than 30 days after it was created. Do not run PoC code from unknown sources.
PoC characteristics
What to hunt for in your logs · from 1 PoC repoPOST /verify
- Body markers
"token"inapplication/json- Ports
- 8080
- Seen in
- 1 repo: covepseng/cve-2026-102268-poc
- Evidence
- covepseng/cve-2026-102268-poc/README.md:146 covepseng/cve-2026-102268-poc/README.md:162
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/verify(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [8080] (msg:"GG PoC-Monitor CVE-2026-102268 jpadilla pyjwt exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/verify"; http.request_body; content:"|22|token|22|"; reference:url,poc.griffinguard.io/cve/CVE-2026-102268; classtype:web-application-attack; sid:9062170; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: jpadilla pyjwt exploit attempt (CVE-2026-102268)
id: gg-pocmon-cve-2026-102268-9062170
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-102268. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-102268
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/verify'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.102268