CVE-2024-24567
Python vulnerability analysis and mitigation

Overview

Vyper is a pythonic Smart Contract Language for the ethereum virtual machine. The vulnerability (CVE-2024-24567) affects version 0.3.10 and earlier versions, where the Vyper compiler allows passing a value in builtin raw_call even when the call is a delegatecall or a staticcall. Due to the semantics of delegatecall and staticcall opcodes, handling of value is not possible, and the compiler silently ignores the value= argument (Vyper Advisory).

Technical details

The vulnerability exists in the RawCall class's buildIR function where the compiler fails to validate whether value was set when either delegatecall or staticcall are provided as kwargs. This allows code such as 'rawcall(self, calldata2, maxoutsize=255, isdelegatecall=True, value=msg.value/2)' to compile without errors, even though the value parameter will be silently ignored (Vyper Advisory).

Impact

If developers are unfamiliar with EVM semantics, they might assume that specifying the value kwarg will send the specified amount to the target. However, in reality, no value is transferred. This can lead to unexpected behavior in contracts that implement multicall functionality using the raw_call built-in, potentially causing value tracking mismatches (Vyper Advisory).

Mitigation and workarounds

The vulnerability has been patched in Vyper version 0.4.0 through pull request #3755. Users are advised to upgrade to this version to address the issue (Vyper Advisory).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management