IT SBIT Services
Schneeberger
DEEN
CVE tracker

Vyper: Storage corruption via @nonreentrant decorator

CVE-2021-48018High 8.3

← All vulnerabilities

Summary

Vyper 0.2.13 before 0.2.15 allocates storage slots for @nonreentrant reentrancy locks at the same locations as contract storage variables. Calling a function marked @nonreentrant overwrites an overlapping storage variable, which corrupts contract state and breaks the intended logic. Smart contracts compiled with the affected Vyper versions are at risk, and an attacker without privileges may be able to trigger the bug through public functions, depending on the contract design.

Affected

  • Vyper 0.2.13 up to but excluding 0.2.15 (vyperlang/vyper, PyPI package vyper)
  • Contracts compiled with these versions that use @nonreentrant

Fixed in

  • Vyper 0.2.15 (fix in PRs #2391 and #2379)
  • Caution: according to a secondary source, a separate later bug in the reentrancy lock affects 0.2.15, 0.2.16 and 0.3.0, and that source reports a fix in 0.3.1. Verify this against the vendor advisory.

Workaround

  • Do not use the @nonreentrant decorator in affected versions (this is a code change that requires reworking contract logic)
  • No other workaround known.

Exploitation

Unknown whether this CVE is exploited in the wild. No public proof of concept found. CISA SSVC: exploitation none, not automatable. A 2023 attack on a Curve pool used a different Vyper reentrancy flaw, not this CVE.

Our recommendation

  • Check whether Vyper is used, including indirect dependencies in lockfiles (e.g. eth-brownie).
  • Identify contracts compiled with 0.2.13 or 0.2.14, and contracts using @nonreentrant that were compiled with 0.2.15 to 0.3.0.
  • After a smart contract audit, recompile and redeploy with a current Vyper release; patching alone does not address the later lock bug.
  • Relevant only for organisations building or operating blockchain or DeFi contracts; otherwise no action needed.

Public exploits

PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.

Research sources

Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 1 Nov 2026, 13:28.

Original description (NVD)

Vyper from 0.2.13 before 0.2.15 allocates storage slots for @nonreentrant reentrancy locks at the same locations as contract storage variables. When a function using @nonreentrant is called, setting the lock overwrites the overlapping storage variable, corrupting contract state and breaking the contract's intended logic.

NVD references (2)

Sources

The tracker combines official, freely usable data sources – updated continuously:

This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.

Affected? We can help.

We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.