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 package | Versions | Reported by |
|---|---|---|
| vyperlang vyper | from 0.1.0b4 before 0.3.0 Not affected: 0.3.0 | CVE List |
| vyper (PyPI) | before 0.2.12 | 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:L/SC:N/SI:N/SA:N |
| VulnCheck | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:L |
| GitHub | medium rating |
Classification
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-48020 changed 2026-10-28 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-22wc-c9wj-6q2v changed 2026-10-24 | CC-BY-4.0 |
| NVD | CVE-2021-48020 changed 2026-10-28 | Public domain |