CVE-2024-24567 raw_call `value=` kwargs not disabled for static and delegate calls

Medium 4.8 Published Updated

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.

PackageAffectedFixed in
vyper PyPIAll versions0.4.0
vyper PyPIAll versions0.4.0
vyper PyPIAll versions0.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.

Sources

Also known as GHSA-x2c2-q32w-4w6m, PYSEC-2024-151.

Is CVE-2024-24567 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free