CVE-2023-42441 Vyper has incorrect re-entrancy lock when key is empty string

Medium 5.3 Published Updated

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.

Weakness: CWE-667, CWE-833

Which versions are affected by CVE-2023-42441?

3 open source packages ship an affected version, including vyper. It affects 1 product.

PackageAffectedFixed in
vyper PyPIFrom 0.2.90.3.10
vyper PyPIFrom 0.2.90.3.10
vyper PyPIFrom 0.2.90.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.

Sources

Also known as GHSA-3hg2-r75x-g69m, PYSEC-2023-305.

Is CVE-2023-42441 in your software?

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

Check your SBOMs for free