Categories
CVE-2026-102275 medium CVSS 6.5

Vulnerability in PyJWT (CVE-2026-102275)

Summary

Vulnerability in PyJWT (CVE-2026-102275). Data can be tampered with by attackers. Exploitable via cnf.jkt. Mitigation: upgrade to 2.15.0 or later.

Original description

The description as published by the source.

Summary

PyJWT accepts internally inconsistent OKP private JWKs where the declared public key x does not correspond to the supplied private key d.

When d is present, OKPAlgorithm.from_jwk() constructs the Ed25519/Ed448 private key from d without verifying that the public key derived from d matches x. As a result, the original JWK can contain one public key identity while PyJWT performs cryptographic operations using a different key.

In affected DPoP integrations, this can allow a stolen sender-constrained access token to be used without possession of the legitimate holder's private key.

Details

The vulnerable logic is in jwt/algorithms.py:

if "x" not in obj:
    raise InvalidKeyError('OKP should have "x" parameter')

x = base64url_decode(obj.get("x"))

if "d" not in obj:
    if curve == "Ed25519":
        return Ed25519PublicKey.from_public_bytes(x)
    return Ed448PublicKey.from_public_bytes(x)

d = base64url_decode(obj.get("d"))

if curve == "Ed25519":
    return Ed25519PrivateKey.from_private_bytes(d)

return Ed448PrivateKey.from_private_bytes(d)

When d is present, x is parsed but never compared with the public key derived from d.

For example, PyJWT accepts:

{
  "kty": "OKP",
  "crv": "Ed25519",
  "x": "",
  "d": ""
}

even though x and d belong to different key pairs.

The behavior has existed since OKP private-JWK import was introduced:

  • Ed25519: PyJWT 2.1.0+
  • Ed448: PyJWT 2.2.0+
  • Confirmed through P…

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-102275 has been found in PyJWT.
Attackers can target a specific entry point like cnf.jkt over the network to misuse the product.
Data can be tampered with by attackers. CVSS score: 6.5/10.
What to do: upgrade PyJWT to 2.15.0 or later.
If unsure, ask your IT team or search "PyJWT CVE-2026-102275" on the vendor's site.

CVE-2026-102275 (PyJWT) — CWE-345 / CVSS v3 6.5
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: cnf.jkt / master / patched_versions / InvalidKeyError
Patched: 2.15.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-345) exists in PyJWT. Attackers reach the vulnerable code path via cnf.jkt without authentication.

📍 Affected scope

Check the vendor advisory for the affected versions of PyJWT. Attack surface: cnf.jkt / master / patched_versions / InvalidKeyError.

🔥 Severity

Severity: Medium (CVSS 6.5/10). Data can be tampered with by attackers.

🔧 How to fix

Update to 2.15.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.15.0

    ステージング環境で 2.15.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.15.0"}]}]
PyPI pyjwt
[{"type":"ECOSYSTEM","events":[{"introduced":"2.1.0"},{"fixed":"2.15.0"}]}]

References

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