Categories
CVE-2026-102274 medium CVSS 5.9

Vulnerability in PyJWT (CVE-2026-102274)

Summary

Vulnerability in PyJWT (CVE-2026-102274). Risk of unauthorized operations or information disclosure. Exploitable via RSAAlgorithm.from_jwk. Mitigation: upgrade to 2.14.0 or later.

Original description

The description as published by the source.

Summary

A malformed RSA JWK inside a JWK Set aborts parsing of the entire set instead of being skipped, because RSAAlgorithm.from_jwk can raise a plain ValueError that isn't caught by PyJWKSet's per-key error-skipping logic.

Affected component / version

  • Package: PyJWT (PyPI, ecosystem pip)
  • Files: jwt/api_jwk.py (PyJWK.__init__, PyJWKSet.__init__), jwt/algorithms.py (RSAAlgorithm.from_jwk)
  • Confirmed present in the master branch as of 2026-09-05 (commit 7144e4534c34810f4525dc4578a32addd8212cff, tag 2.13.0). Directly verified identical in tags 2.9.0, 2.10.0, 2.11.0, 2.12.0, 2.12.1, 2.13.0 -- the vulnerable call and the except PyJWTError guard are unchanged across all six releases. Not verified against any release prior to 2.9.0.

Details

PyJWKSet.__init__ (jwt/api_jwk.py:145-152) iterates each key in a JWK Set:

for key in keys:
    try:
        self.keys.append(PyJWK(key))
    except PyJWTError as error:
        if isinstance(error, MissingCryptographyError):
            raise error
        # skip unusable keys
        continue

PyJWK.__init__ (api_jwk.py:82) calls self.Algorithm.from_jwk(self._jwk_data) with no try/except of its own. For an RSA JWK, this dispatches to RSAAlgorithm.from_jwk (jwt/algorithms.py:539-586). When the JWK supplies d, e, n without the CRT parameters (p, q, dp, dq, qi), from_jwk calls cryptography's `rsa_recover_prime_factors(public_numbers.n, d,…

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-102274 has been found in PyJWT.
Attackers can target a specific entry point like RSAAlgorithm.from_jwk over the network to misuse the product.
Risk of unauthorized operations or information disclosure. CVSS score: 5.9/10.
What to do: upgrade PyJWT to 2.14.0 or later.
If unsure, ask your IT team or search "PyJWT CVE-2026-102274" on the vendor's site.

CVE-2026-102274 (PyJWT) — CWE-755 / CVSS v3 5.9
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: RSAAlgorithm.from_jwk / ValueError / PyJWKSet / PyJWT
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-755) exists in PyJWT. Attackers reach the vulnerable code path via RSAAlgorithm.from_jwk without authentication.

📍 Affected scope

Check the vendor advisory for the affected versions of PyJWT. Attack surface: RSAAlgorithm.from_jwk / ValueError / PyJWKSet / PyJWT.

🔥 Severity

Severity: Medium (CVSS 5.9/10). Risk of unauthorized operations or information disclosure.

🔧 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":"2.9.0"},{"fixed":"2.14.0"}]}]

References

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