CVE-2021-48018
JSON

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 packageVersionsReported by
vyperlang vyperfrom 0.2.13 before 0.2.15
Not affected: 0.2.15
CVE List
vyper (PyPI)from 0.2.13 before 0.2.15GitHub Advisory Database

All scores

VulnCheck8.3high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N
VulnCheck7.4high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H
GitHubhigh rating

Classification

CWE-787

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

SourceRecordLicence
CVE ListCVE-2021-48018 changed 2026-10-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-7f92-rr6w-cq64 changed 2026-10-24CC-BY-4.0
NVDCVE-2021-48018 changed 2026-10-23Public domain