SSRF (Server-Side Request Forgery) in web3 (CVE-2026-40072)
Summary
SSRF in web3 (CVE-2026-40072). Risk of unauthorized operations or information disclosure. Exploitable via OffchainLookup. Mitigation: upgrade to 8.0.0b2 or later.
Original description
The description as published by the source.
Summary
web3.py implements CCIP Read / OffchainLookup (EIP-3668) by performing HTTP requests to URLs supplied by smart contracts in offchain_lookup_payload["urls"]. The implementation uses these contract-supplied URLs directly (after {sender} / {data} template substitution) without any destination validation:
- No restriction to
https://(and no opt-in gate forhttp://) - No hostname or IP allowlist
- No blocking of private/reserved IP ranges (loopback, link-local, RFC1918)
- No redirect target validation (both
requestsandaiohttpfollow redirects by default)
CCIP Read is enabled by default (global_ccip_read_enabled = True on all providers), meaning any application using web3.py's .call() method is exposed without explicit opt-in.
This results in Server-Side Request Forgery (SSRF) when web3.py is used in backend services, indexers, APIs, or any environment that performs eth_call / .call() against untrusted or user-supplied contract addresses. A malicious contract can force the web3.py process to issue HTTP requests to arbitrary destinations, including internal network services and cloud metadata endpoints.
Why This Is a Vulnerability
The argument is not that CCIP Read itself is invalid or that web3.py should stop supporting EIP-3668. The issue is that, in server-side deployments (backends, indexers, bots, APIs), the current implementation doesn't provide destination policy controls, such as a validation/override hook, private-…
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-40072 has been found in web3.
Attackers can target a specific entry point like OffchainLookup over the network to misuse the product.
Risk of unauthorized operations or information disclosure. CVSS score: 7.2/10.
What to do: upgrade web3 to 8.0.0b2 or later.
If unsure, ask your IT team or search "web3 CVE-2026-40072" on the vendor's site.
CVE-2026-40072 (web3) — CWE-918 / CVSS v3 7.2
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: OffchainLookup / requests / aiohttp / eth_call
Patched: 8.0.0b2 — 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.
SSRF (CWE-918) exists in web3. Attackers reach the vulnerable code path via OffchainLookup without authentication.
Check the vendor advisory for the affected versions of web3. Attack surface: OffchainLookup / requests / aiohttp / eth_call.
Severity: High (CVSS 7.2/10). Risk of unauthorized operations or information disclosure.
Update to 8.0.0b2.
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 'web3' . 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 'web3' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
web3を grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade web3 to 8.0.0b2ステージング環境で 8.0.0b2 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web github.com