GHSA-22wc-c9wj-6q2v: VVE-2021-0001 Memory Corruption Using Function Calls Vulnerability
MODERATEGHSA-22wc-c9wj-6q2v is a MODERATE memory corruption using function calls vulnerability (CWE-129: Improper Validation of Array Index) affecting VVE-2021-0001 libraries in the PyPI ecosystem. The issue involves memory corruption using function calls within arrays. Remediation is available by upgrading affected packages to version 0.2.12.
GHSA-22wc-c9wj-6q2v at a Glance
How to Fix GHSA-22wc-c9wj-6q2v
To remediate this vulnerability, upgrade all affected VVE-2021-0001 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install vyper>=0.2.12
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show vyper
How to Check if You Are Affected
To determine whether your Python environment is affected by GHSA-22wc-c9wj-6q2v, inspect your installed packages using pip:
pip show vyper
Analyze the terminal output to locate any version of VVE-2021-0001 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.12), your application is affected.
Note: The pip show vyper command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-129: Improper Validation of Array Index, where the product uses untrusted input when calculating or using an array index, but the product does not validate or incorrectly validates the index to ensure the index references a valid position within the array. In VVE-2021-0001, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-22wc-c9wj-6q2v Affected VVE-2021-0001 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
vyper
|
PyPI |
< 0.2.12
|
0.2.12
|
References
Frequently Asked Questions
What is GHSA-22wc-c9wj-6q2v?
Which VVE-2021-0001 versions are affected?
What version fixes GHSA-22wc-c9wj-6q2v?
Is vyper affected?
What CWE is associated with GHSA-22wc-c9wj-6q2v?
How can I check PyPI dependencies for GHSA-22wc-c9wj-6q2v?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-22wc-c9wj-6q2v",
"modified" : "2021-04-16T23:11:53Z",
"published" : "2021-04-19T15:12:05Z",
"aliases" : [ ],
"summary" : "VVE-2021-0001: Memory corruption using function calls within arrays",
"details" : "### Impact\nWhen 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.\n\n### Patches\nThis issue was partially fixed in [VVE-2020-0004](https://github.com/vyperlang/vyper/security/advisories/GHSA-2r3x-4mrv-mcxf), 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",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "vyper"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.2.12"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/vyperlang/vyper/security/advisories/GHSA-22wc-c9wj-6q2v"
}, {
"type" : "WEB",
"url" : "https://github.com/vyperlang/vyper/pull/2345"
}, {
"type" : "WEB",
"url" : "https://github.com/vyperlang/vyper/commit/11b7b5b7e59bc9dc859d51cd41a924b59fe47c9e"
}, {
"type" : "WEB",
"url" : "https://pypi.org/project/vyper"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-129" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-04-16T23:11:53Z",
"nvd_published_at" : null
}
}