CVE-2024-24567 raw_call `value=` kwargs not disabled for static and delegate calls
Vyper compiler silently ignores value arguments in static/delegate calls, potentially misleading developers about fund transfers.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-24567?
CVE-2024-24567 is a medium-severity vulnerability in vyperlang vyper, published on 30 Jan 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Vyper is a pythonic Smart Contract Language for the ethereum virtual machine. Vyper compiler allows passing a value in builtin raw_call even if the call is a delegatecall or a staticcall. But in the context of delegatecall and staticcall the handling of value is not possible due to the semantics of the respective opcodes, and vyper will silently ignore the value= argument. If the semantics of the EVM are unknown to the developer, he could suspect that by specifying the `value` kwarg, exactly the given amount will be sent along to the target. This vulnerability affects 0.3.10 and earlier versions.
Weakness: CWE-754
Which versions are affected by CVE-2024-24567?
3 open source packages ship an affected version, including vyper. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
vyper PyPI | All versions | 0.4.0 |
vyper PyPI | All versions | 0.4.0 |
vyper PyPI | All versions | 0.4.0b1 |
Products include Vyperlang Vyper.
How do I fix CVE-2024-24567?
Upgrade vyper to a fixed version for your release line: 0.4.0 or 0.4.0b1.
Is CVE-2024-24567 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-24567 exists.
Other vulnerabilities in vyperlang vyper
- CVE-2024-24563 Vyper array negative index vulnerability
- CVE-2024-24561 Vyper bounds check on built-in `slice()` function can be overflowed
- CVE-2023-39363 Vyper incorrectly allocated named re-entrancy locks
- CVE-2022-24845 Integer bounds error in Vyper
- CVE-2022-29255 Multiple evaluation of contract address in call in vyper
Sources
Also known as GHSA-x2c2-q32w-4w6m, PYSEC-2024-151.