CVE-2023-42441 Vyper has incorrect re-entrancy lock when key is empty string
Vyper compiler fails to enforce reentrancy locks when the lock name is an empty string, allowing attackers to bypass security checks 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-2023-42441?
CVE-2023-42441 is a medium-severity vulnerability in vyperlang vyper, published on 18 Sep 2023. 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 (EVM). Starting in version 0.2.9 and prior to version 0.3.10, locks of the type `@nonreentrant("")` or `@nonreentrant('')` do not produce reentrancy checks at runtime. This issue is fixed in version 0.3.10. As a workaround, ensure the lock name is a non-empty string.
Which versions are affected by CVE-2023-42441?
3 open source packages ship an affected version, including vyper. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
vyper PyPI | From 0.2.9 | 0.3.10 |
vyper PyPI | From 0.2.9 | 0.3.10 |
vyper PyPI | From 0.2.9 | 0.3.10 |
Products include Vyperlang Vyper.
How do I fix CVE-2023-42441?
Upgrade vyper to 0.3.10 or later.
Is CVE-2023-42441 being exploited?
There is no known exploitation of CVE-2023-42441 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-3hg2-r75x-g69m, PYSEC-2023-305.