8.3high
Vyper 0.2.13 before 0.2.15 Storage Corruption via @nonreentrant Decorator
- Severity
- 8.3high CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.39% (higher than 35% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
- Also known as
- GHSA-7f92-rr6w-cq64
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| vyperlang vyper | from 0.2.13 before 0.2.15 Not affected: 0.2.15 | CVE List |
| vyper (PyPI) | from 0.2.13 before 0.2.15 | GitHub Advisory Database |
All scores
| VulnCheck | 8.3high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N |
| VulnCheck | 7.4high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H |
| GitHub | high rating |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
Background
When attempting to use the v0.2.14 release, @pandadefi discovered an issue using the @nonreentrant decorator.
Impact
Reentrancy protection storage slots get allocated to the same slots as storage variables, leading to the corruption of storage variables when using the @nonreentrant decorator.
Patches
This issue was fixed in v0.2.15 in #2391, #2379
Workarounds
Don't use the @nonreentrant decorator in these versions.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-48018 changed 2026-10-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-7f92-rr6w-cq64 changed 2026-10-24 | CC-BY-4.0 |
| NVD | CVE-2021-48018 changed 2026-10-23 | Public domain |