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

Published Sep 18, 2023
·
Updated

Impact

Locks of the type @nonreentrant("") or @nonreentrant('') do not produce reentrancy checks at runtime.

Vyper @nonreentrant("") # unprotected @external def bar(): pass

@nonreentrant("lock") # protected @external def foo(): pass Patches

Patched in #3605

Workarounds

The lock name should be a non-empty string.

References Are there any links users can visit to find out more?

Other sources

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.

— MITRE

Affected Software

2 affected componentsFixes available
pip/vyper>=0.2.9<0.3.10
0.3.10
vyperlang Vyper Python>=0.2.9<0.3.10

Event History

Sep 18, 2023
Advisory Published
07:20 PM
CVE Published
via MITRE·08:19 PM
Data Sourced
via MITRE·08:19 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What is CVE-2023-42441?

CVE-2023-42441 is a vulnerability in the Vyper smart contract language that allows reentrancy attacks.

2

What is the impact of CVE-2023-42441?

The impact of CVE-2023-42441 is that locks with the `@nonreentrant` decorator do not produce reentrancy checks at runtime, making the smart contract vulnerable to reentrancy attacks.

3

How do I fix CVE-2023-42441?

To fix CVE-2023-42441, update to Vyper version 0.3.10 or higher.

4

Where can I find more information about CVE-2023-42441?

You can find more information about CVE-2023-42441 at the following references: [Link 1](https://github.com/vyperlang/vyper/commit/0b740280c1e3c5528a20d47b29831948ddcc6d83), [Link 2](https://github.com/vyperlang/vyper/pull/3605), [Link 3](https://github.com/vyperlang/vyper/security/advisories/GHSA-3hg2-r75x-g69m).

5

What is the severity of CVE-2023-42441?

CVE-2023-42441 has a severity rating of 5.3 (medium).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203