CVE-2026-40072: web3.py SSRF Vulnerability via CCIP Read OffchainLookup URL Handling

web3 Updated 18 Jul 2026

Summary

13/07/2026
Yes i
High
7.2

CVE-2026-40072: web3.py: SSRF via CCIP Read (EIP-3668) OffchainLookup URL handling. Affects web3 across 2 version ranges.

>= 6.0.0b3, < 7.15.0 >= 8.0.0b1, < 8.0.0b2

Fixed in 7.15.0 or 8.0.0b2, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

web3.py is a widely-used Python library that facilitates interaction with Ethereum blockchain and smart contracts. It provides various functionalities, including sending transactions, querying blockchain data, and executing smart contract methods. The library's implementation of CCIP Read (EIP-3668) allows smart contracts to specify URLs for off-chain data retrieval. However, this feature has a significant security flaw that exposes applications to Server-Side Request Forgery (SSRF) attacks.

Vulnerability Detail

The vulnerability arises from the way web3.py handles URLs supplied by smart contracts in the offchain_lookup_payload. The library directly uses these URLs for HTTP requests without validating their destinations. This lack of validation allows a malicious contract to force the web3.py process to issue requests to arbitrary destinations, including internal network services and cloud metadata endpoints. The SSRF risk is exacerbated by the default-on nature of CCIP Read, meaning any application using web3.py's call method is exposed unless explicitly disabled. The vulnerability can lead to unauthorized access to sensitive internal services and data.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 6.0.0b3, < 7.15.0 7.15.0
    pip install --upgrade "web3==7.15.0"
  • >= 8.0.0b1, < 8.0.0b2 8.0.0b2
    pip install --upgrade "web3==8.0.0b2"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary workaround, you can disable CCIP Read by setting the global_ccip_read_enabled flag to False in your application: global_ccip_read_enabled = False. This will prevent the automatic invocation of the CCIP Read feature, reducing the risk of SSRF attacks.

Conclusion

The web3.py library has a critical SSRF vulnerability due to improper handling of URLs in the CCIP Read feature. It is essential to update to the patched versions to mitigate the risk and implement additional security measures to protect against potential exploitation.

See every vulnerability recorded for web3 →

Share this vulnerability

FAQ

Server-Side Request Forgery (SSRF) is a security vulnerability that allows an attacker to send crafted requests from a vulnerable server to internal or external resources, potentially leading to unauthorized access to sensitive data.

You can check if your application is affected by using the Vulert playground at Vulert Scanner. This tool allows you to monitor and alert for open-source vulnerabilities without requiring any installation.

The risks include unauthorized access to internal services, exposure of sensitive data, and potential exploitation of internal APIs, which can lead to further security breaches.

Yes, you can mitigate the risk by disabling the CCIP Read feature in your application, but updating to the patched version is the recommended solution.

The CVSS score of this vulnerability is 7.2, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for web3.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 6.0.0b3, < 7.15.0 7.15.0
    pip install --upgrade "web3==7.15.0"
  • >= 8.0.0b1, < 8.0.0b2 8.0.0b2
    pip install --upgrade "web3==8.0.0b2"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback