CVE-2026-40072

HIGH

web3.py affected by SSRF via CCIP Read (EIP-3668) OffchainLookup URL handling

Title source: cna
STIX 2.1

Exploitation Summary

EIP tracks 1 public exploit for CVE-2026-40072. PoCs published by u1tr0nex.

AI-analyzed exploit summary This repository provides a functional local lab demonstrating CVE-2026-40072, an SSRF vulnerability in web3.py's CCIP Read/OffchainLookup handling. It includes scripts to reproduce the issue, intercept requests with Burp Suite, and verify the patch.

Description

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 offchain_lookup_payload["urls"]. The implementation uses these contract-supplied URLs directly (after {sender} / {data} template substitution) without any destination validation. 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. This vulnerability is fixed in 7.15.0 and 8.0.0b2.

Exploits (1)

github WORKING POC
by u1tr0nex · poc
https://github.com/u1tr0nex/cve-2026-40072-ssrf-lab

This repository provides a functional local lab demonstrating CVE-2026-40072, an SSRF vulnerability in web3.py's CCIP Read/OffchainLookup handling. It includes scripts to reproduce the issue, intercept requests with Burp Suite, and verify the patch.

Classification
Working Poc 95%
Attack Type
Ssrf
Complexity
Moderate
Reliability
Reliable
Target: web3.py (versions prior to 7.15.0)
No auth needed
Prerequisites: Kali Linux · Python 3.13+ · Burp Suite · virtual environment
devstral-2 · analyzed Jun 05, 2026 Full analysis →

Scores

CVSS v3 7.2
EPSS 0.0006
EPSS Percentile 19.3%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N

CISA SSVC

Vulnrichment
Exploitation poc
Automatable no
Technical Impact partial

Details

CWE
CWE-918
Status published
Products (7)
apeworx/web3.py 6.0.0 (10 CPE variants)
apeworx/web3.py 8.0.0 beta1
apeworx/web3.py 6.1.0 - 7.15.0
ethereum/web3.py >= 6.0.0b3, < 7.15.0
ethereum/web3.py >= 8.0.0b1, < 8.0.0b2
pypi/web3 6.0.0b3 - 7.15.0PyPI
pypi/web3 8.0.0b1 - 8.0.0b2PyPI
Published Apr 09, 2026
Tracked Since Apr 09, 2026