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, ecosystempip) - Files:
jwt/api_jwk.py(PyJWK.__init__,PyJWKSet.__init__),jwt/algorithms.py(RSAAlgorithm.from_jwk) - Confirmed present in the
masterbranch as of 2026-09-05 (commit7144e4534c34810f4525dc4578a32addd8212cff, tag2.13.0). Directly verified identical in tags2.9.0,2.10.0,2.11.0,2.12.0,2.12.1,2.13.0-- the vulnerable call and theexcept PyJWTErrorguard are unchanged across all six releases. Not verified against any release prior to2.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.
A vulnerability (CWE-755) exists in PyJWT. Attackers reach the vulnerable code path via RSAAlgorithm.from_jwk without authentication.
Check the vendor advisory for the affected versions of PyJWT. Attack surface: RSAAlgorithm.from_jwk / ValueError / PyJWKSet / PyJWT.
Severity: Medium (CVSS 5.9/10). Risk of unauthorized operations or information disclosure.
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
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- package pypi.org
- web github.com
- web github.com
- web github.com