GHSA-4v7v-gqf9-ww2g: Vyper Call Stack Corruption When Passing Vulnerability

MODERATE
CWE-682
Published
Advisory Summary

GHSA-4v7v-gqf9-ww2g is a MODERATE call stack corruption when passing vulnerability (CWE-682: Incorrect Calculation) affecting Vyper libraries in the PyPI ecosystem. The issue involves call stack corruption when passing complex type containing non-base type members as argument. Remediation is available by upgrading affected packages to version 0.2.6.

GHSA-4v7v-gqf9-ww2g at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-4v7v-gqf9-ww2g
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-682: Incorrect Calculation
Affected Product Vyper
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix GHSA-4v7v-gqf9-ww2g

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.

vyper fixed: 0.2.6
pip install vyper>=0.2.6
Verify Direct and Transitive Dependencies

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-4v7v-gqf9-ww2g, 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-682: Incorrect Calculation, where the product performs a calculation that generates incorrect or unintended results that are later used in security-critical decisions or resource management. 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

### 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: ```python @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`](https://github.com/vyperlang/vyper/releases/tag/v0.2.6).

GHSA-4v7v-gqf9-ww2g Affected Vyper Versions

1 component(s)
Fixed Versions:
0.2.6
Product / Package Ecosystem Affected Versions Fixed Version
vyper
PyPI
< 0.2.6
0.2.6

References

Frequently Asked Questions

What is GHSA-4v7v-gqf9-ww2g?
GHSA-4v7v-gqf9-ww2g is a security vulnerability in Vyper involving Call stack corruption when passing complex type containing non-base type members as argument under CWE-682: Incorrect Calculation.
Which Vyper versions are affected?
Affected versions include releases prior to 0.2.6 across affected packages: vyper.
What version fixes GHSA-4v7v-gqf9-ww2g?
Upgrading to 0.2.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is vyper affected?
Yes, vyper is affected in releases prior to 0.2.6. Upgrade your dependency to 0.2.6 or later.
What CWE is associated with GHSA-4v7v-gqf9-ww2g?
GHSA-4v7v-gqf9-ww2g is classified under CWE-682: Incorrect Calculation (The product performs a calculation that generates incorrect or unintended results that are later used in security-critical decisions or resource management.).
How can I check PyPI dependencies for GHSA-4v7v-gqf9-ww2g?
Run the dependency tree command: 'pip show vyper'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4v7v-gqf9-ww2g",
  "modified" : "2026-10-06T15:22:23Z",
  "published" : "2026-10-06T15:22:23Z",
  "aliases" : [ ],
  "summary" : "Vyper: Call stack corruption when passing complex type containing non-base type members as argument",
  "details" : "### Impact\nWhen 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.\n\nExample code:\n```python\n@internal\ndef test_input(arr: int128[2][1], i: int128) -> (int128[2][1], int128):\n    return arr, i\n\n@external\ndef test_values(arr: int128[2][1], i: int128) -> (int128[2][1], int128):\n    return self.test_input(arr, i)\n```\n\nPlease see #2183 for further information\n\n### Patches\nThis problem was fixed in #2184, 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-4v7v-gqf9-ww2g"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vyperlang/vyper/issues/2183"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vyperlang/vyper/pull/2184"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vyperlang/vyper/commit/0be02b7331e8febe79d5a4218829c72e30417a29"
  }, {
    "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-682" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-10-06T15:22:23Z",
    "nvd_published_at" : null
  }
}