CVE-2026-40072: web3.py affected by SSRF via CCIP Read (EIP-3668) OffchainLookup URL handling
web3.py allows you to interact with the Ethereum blockchain using Python. From 6.0.0b3 to before 7.15.0 and 8.0.0b2, web3.py implements CCIP Read / OffchainLookup (EIP-3668) by performing HTTP requests to URLs supplied by smart contracts in offchainlookuppayload["urls"]. The implementation uses these contract-supplied URLs directly (after {sender} / {data} template substitution) without any destination validation. CCIP Read is enabled by default (globalccipreadenabled = 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 ethcall / .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. This vulnerability is fixed in 7.15.0 and 8.0.0b2.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2026-40072?
CVE-2026-40072 has been classified as a high severity vulnerability due to its potential for SSRF exploitation.
How do I fix CVE-2026-40072?
To fix CVE-2026-40072, upgrade web3.py to version 7.15.0 or later, or version 8.0.0b3 or later.
What type of vulnerability is CVE-2026-40072?
CVE-2026-40072 is classified as a Server-Side Request Forgery (SSRF) vulnerability.
Which versions of web3.py are affected by CVE-2026-40072?
Versions of web3.py from 6.0.0b3 to before 7.15.0 and up to (but not including) 8.0.0b2 are affected by CVE-2026-40072.
What is the impact of CVE-2026-40072 on applications using web3.py?
CVE-2026-40072 can allow attackers to perform unauthorized HTTP requests from the server context, potentially leading to data exposure or other security issues.