CVE-2021-48020
JSON

8.3high

Vyper before 0.3.0 Memory Corruption via Internal Function Calls in Arrays

Severity
8.3high CVSS:4.0 by VulnCheck
Exploit likelihood
0.35% (higher than 30% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
VulnCheck
Also known as
GHSA-22wc-c9wj-6q2v

Description

Vyper from 0.1.0b4 before 0.3.0 contains a memory corruption vulnerability caused by an incorrect stack tip pointer when internal function calls are performed inside arrays. Contracts placing internal calls in nested array elements, external call arguments, struct literals, or raw_log topics can have memory corrupted, producing incorrect contract behavior.

Affected

Product or packageVersionsReported by
vyperlang vyperfrom 0.1.0b4 before 0.3.0
Not affected: 0.3.0
CVE List
vyper (PyPI)before 0.2.12GitHub 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:L/SC:N/SI:N/SA:N
VulnCheck6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:L
GitHubmedium rating

Classification

CWE-129CWE-787

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Vyper from 0.1.0b4 before 0.3.0 contains a memory corruption vulnerability caused by an incorrect stack tip pointer when internal function calls are performed inside arrays. Contracts placing internal calls in nested array elements, external call arguments, struct literals, or raw_log topics can have memory corrupted, producing incorrect contract behavior.

GitHub Advisory Database
Impact

When performing a function call inside an array, there is a memory corruption issue that occurs because of an incorrect pointer to the the tip of the stack.

Patches

This issue was partially fixed in VVE-2020-0004, however the fix did not update similar code for arrays, which had a similar issue. The issue is fully fixed in https://github.com/vyperlang/vyper/pull/2345

References

Sources

SourceRecordLicence
CVE ListCVE-2021-48020 changed 2026-10-28CVE Terms of Use
GitHub Advisory DatabaseGHSA-22wc-c9wj-6q2v changed 2026-10-24CC-BY-4.0
NVDCVE-2021-48020 changed 2026-10-28Public domain