Vulnerability in PyJWT (CVE-2026-102268)
Summary
Vulnerability in PyJWT (CVE-2026-102268). Confidential information can be exposed externally. Exploitable via jwt.decode. Mitigation: upgrade to 2.14.0 or later.
Original description
The description as published by the source.
Prerequisites (both conditions must hold; both are deployment properties, not attacker-controlled at request time):
- The
jwt.decodeallow-list mixes an HMAC algorithm with an asymmetric one, e.g.algorithms=["ES256", "HS256"](the RFC 8725 footgun the guard exists to backstop). - The verification key is passed as raw PEM text/bytes on the non-
PyJWKpath, in a byte-form thatcryptography's loader accepts but PyJWT'sis_pem_formatregex does not recognize (marker-adjacent whitespace/indentation, CR-only line terminators, or the PEM folded to a single line). Such forms arise naturally from an indented YAML/JSON block, a single-line environment variable or JSON string, or a CR/LF round-trip through config tooling.
The attacker additionally needs the public verification key, which is public by definition, and cryptography must be installed.
The fix for CVE-2022-29217 rejects an asymmetric key handed to an HMAC algorithm, but only when is_pem_format() recognizes the key as PEM. That recognizer accepts strictly fewer byte-forms than the loader that later parses the key, so a PEM the guard misses still loads as a valid public key and is then used as an HMAC secret. This is an incomplete-guard bypass of the CVE-2022-29217 family.
Summary
A PEM public key with marker-adjacent whitespace, CR-only line terminators, or folded to a single line makes PyJWT's is_pem_format() return False while cryptography.load_pem_public_key() accepts the identical bytes. Th…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-102268 has been found in PyJWT.
Attackers can target a specific entry point like jwt.decode over the network to misuse the product.
Confidential information can be exposed externally. CVSS score: 9.1/10.
What to do: upgrade PyJWT to 2.14.0 or later.
If unsure, ask your IT team or search "PyJWT CVE-2026-102268" on the vendor's site.
CVE-2026-102268 (PyJWT) — CWE-347 / CVSS v3 9.1
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: jwt.decode / PyJWK / cryptography / is_pem_format
Patched: 2.14.0 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-347) exists in PyJWT. Attackers reach the vulnerable code path via jwt.decode without authentication.
Check the vendor advisory for the affected versions of PyJWT. Attack surface: jwt.decode / PyJWK / cryptography / is_pem_format.
Severity: Critical (CVSS 9.1/10). Confidential information can be exposed externally.
Update to 2.14.0.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'PyJWT' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'PyJWT' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
PyJWTを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade PyJWT to 2.14.0ステージング環境で 2.14.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- exploit github.com
- patch security-advisories@github.com
- web security-advisories@github.com
- web nvd.nist.gov
- web github.com