CVE-2024-32648 vyper default functions don't respect nonreentrancy keys
Vyper compiler fails to enforce non-reentrancy locks on default functions, potentially allowing reentrancy attacks in smart contracts.
- 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-32648?
CVE-2024-32648 is a medium-severity vulnerability in vyperlang vyper, published on 25 Apr 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. Prior to version 0.3.0, default functions don't respect nonreentrancy keys and the lock isn't emitted. No vulnerable production contracts were found. Additionally, using a lock on a `default` function is a very sparsely used pattern. As such, the impact is low. Version 0.3.0 contains a patch for the issue.
Weakness: CWE-667
Which versions are affected by CVE-2024-32648?
3 open source packages ship an affected version, including vyper. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
vyper PyPI | All versions | 0.3.0 |
vyper PyPI | All versions | 0.3.0 |
vyper PyPI | All versions | 0.3.0 |
Products include Vyperlang Vyper.
How do I fix CVE-2024-32648?
Upgrade vyper to 0.3.0 or later.
Is CVE-2024-32648 being exploited?
There is no known exploitation of CVE-2024-32648 in the wild and no public exploit code.
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-m2v9-w374-5hj9, PYSEC-2024-163.