GHSA-2r3x-4mrv-mcxf: Vyper Memory Corruption Using Function Calls Vulnerability
MODERATEGHSA-2r3x-4mrv-mcxf is a MODERATE memory corruption using function calls vulnerability (CWE-129: Improper Validation of Array Index) affecting Vyper libraries in the PyPI ecosystem. The issue involves memory corruption using function calls within tuples / nested calls. Remediation is available by upgrading affected packages to version 0.2.6.
GHSA-2r3x-4mrv-mcxf at a Glance
How to Fix GHSA-2r3x-4mrv-mcxf
To remediate this vulnerability, upgrade all affected Vyper 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.6
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-2r3x-4mrv-mcxf, inspect your installed packages using pip:
pip show vyper
Analyze the terminal output to locate any version of Vyper in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.6), 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 Vyper, 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-2r3x-4mrv-mcxf Affected Vyper Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
vyper
|
PyPI |
< 0.2.6
|
0.2.6
|
References
Frequently Asked Questions
What is GHSA-2r3x-4mrv-mcxf?
Which Vyper versions are affected?
What version fixes GHSA-2r3x-4mrv-mcxf?
Is vyper affected?
What CWE is associated with GHSA-2r3x-4mrv-mcxf?
How can I check PyPI dependencies for GHSA-2r3x-4mrv-mcxf?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2r3x-4mrv-mcxf",
"modified" : "2026-10-06T15:22:29Z",
"published" : "2026-10-06T15:22:29Z",
"aliases" : [ ],
"summary" : "Vyper: Memory corruption using function calls within tuples / nested calls",
"details" : "### Impact\nWhen performing a function call inside a tuple or as an argument inside another function call, there is a memory corruption issue that occurs because of an incorrect pointer to the the tip of the stack.\n\nExample code:\n```python\n@internal\ndef _foo(a: uint256, b: uint256, c: uint256) -> (uint256, uint256, uint256, uint256, uint256):\n return 1, a, b, c, 5\n\n@internal\ndef _foo2() -> uint256:\n a: uint256[10] = [6,7,8,9,10,11,12,13,15,16]\n return 4\n\n@external\ndef foo() -> (uint256, uint256, uint256, uint256, uint256):\n return self._foo(2, 3, self._foo2())\n```\n\nPlease see #2186 for further information\n\n### Patches\nThis problem was fixed in #2186, and released as a part of [`v0.2.6`](https://github.com/vyperlang/vyper/releases/tag/v0.2.6).",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "vyper"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.2.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/vyperlang/vyper/security/advisories/GHSA-2r3x-4mrv-mcxf"
}, {
"type" : "WEB",
"url" : "https://github.com/vyperlang/vyper/pull/2186"
}, {
"type" : "WEB",
"url" : "https://github.com/vyperlang/vyper/commit/74ba67d4bec5f8be4f05759e37d2bfb1463e0441"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/vyperlang/vyper"
}, {
"type" : "WEB",
"url" : "https://github.com/vyperlang/vyper/releases/tag/v0.2.6"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-129" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-10-06T15:22:29Z",
"nvd_published_at" : null
}
}