GHSA-4v7v-gqf9-ww2g

Suggest an improvement
Source
https://github.com/advisories/GHSA-4v7v-gqf9-ww2g
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-4v7v-gqf9-ww2g/GHSA-4v7v-gqf9-ww2g.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-4v7v-gqf9-ww2g
Published
2026-10-06T15:22:23Z
Modified
2026-10-06T15:30:03Z
Severity
  • 6.9 (Medium) CVSS_V4 - 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 CVSS Calculator
Summary
Vyper: Call stack corruption when passing complex type containing non-base type members as argument
Details

Impact

When we pass a multi-dimensional array (like [[1, 2], [3, 4]]) as an argument to internal/external functions we get incorrect output. This is due to a stack management issue, because it was assumed that the size of each subtype of an array/struct is 32, which is not always correct.

Example code:

@internal
def test_input(arr: int128[2][1], i: int128) -> (int128[2][1], int128):
    return arr, i

@external
def test_values(arr: int128[2][1], i: int128) -> (int128[2][1], int128):
    return self.test_input(arr, i)

Please see #2183 for further information

Patches

This problem was fixed in #2184, and released as a part of v0.2.6.

Database specific
{
    "cwe_ids": [
        "CWE-682"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-10-06T15:22:23Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
}
References

Affected packages

PyPI / vyper

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.2.6

Affected versions

0.*
0.1.0b1
0.1.0b2
0.1.0b3
0.1.0b4
0.1.0b5
0.1.0b6
0.1.0b7
0.1.0b8
0.1.0b9
0.1.0b10
0.1.0b11
0.1.0b12
0.1.0b13
0.1.0b14
0.1.0b15
0.1.0b16
0.1.0b17
0.2.1
0.2.2
0.2.3
0.2.4
0.2.5

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-4v7v-gqf9-ww2g/GHSA-4v7v-gqf9-ww2g.json"