Categories
CVE-2026-102268 critical CVSS 9.1

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.decode allow-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-PyJWK path, in a byte-form that cryptography's loader accepts but PyJWT's is_pem_format regex 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.

❓ What is the problem

A vulnerability (CWE-347) exists in PyJWT. Attackers reach the vulnerable code path via jwt.decode without authentication.

📍 Affected scope

Check the vendor advisory for the affected versions of PyJWT. Attack surface: jwt.decode / PyJWK / cryptography / is_pem_format.

🔥 Severity

Severity: Critical (CVSS 9.1/10). Confidential information can be exposed externally.

🔧 How to fix

Update to 2.14.0.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

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

  1. 1
    Identify exposure identify
    grep -r 'PyJWT' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で PyJWT を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patch patch
    Upgrade PyJWT to 2.14.0

    ステージング環境で 2.14.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

pip PyJWT
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.14.0"}]}]
PyPI pyjwt
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.14.0"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details