Skip to content
Heist/ feed
Back to feed
MediumFix available

Vyper: Memory corruption using function calls within tuples / nested calls

Type: advisorySources: OSV

### Impact When 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. Example code: ```python @internal def _foo(a: uint256, b: uint256, c: uint256) -> (uint256, uint256, uint256, uint256, uint256): return 1, a, b, c, 5 @internal def _foo2() -> uint256: a: uint256[10] = [6,7,8,9,10,11,12,13,15,16] return 4 @external def foo() -> (uint256, uint256, uint256, uint256, uint256): return self._foo(2, 3, self._foo2()) ``` Please see #2186 for further information ### Patches This problem was fixed in #2186, and released as a part of [`v0.2.6`](https://github.com/vyperlang/vyper/releases/tag/v0.2.6).

Products
vyper
Affected versions
0.1.0b1, 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.1.0b2, 0.1.0b3, 0.1.0b4, 0.1.0b5, 0.1.0b6, 0.1.0b7, 0.1.0b8, 0.1.0b9, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5
Fixed versions
0.2.6
CVEs
CVE-2020-37286
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 03:39 UTC · Revision 1

Source evidence

Vyper: Memory corruption using function calls within tuples / nested calls

core-osv · Original source

Published 6 Oct 2026, 15:22 UTC

### Impact When 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. Example code: ```python @internal def _foo(a: uint256, b: uint256, c: uint256) -> (uint256, uint256, uint256, uint256, uint256): return 1, a, b, c, 5 @internal def _foo2() -> uint256: a: uint256[10] = [6,7,8,9,10,11,12,13,15,16] return 4 @external def foo() -> (uint256, uint256, uint256, uint256, uint256): return self._foo(2, 3, self._foo2()) ``` Please see #2186 for further information ### Patches This problem was fixed in #2186, and released as a part of [`v0.2.6`](https://github.com/vyperlang/vyper/releases/tag/v0.2.6).

osv:GHSA-2r3x-4mrv-mcxf

vyper

Fixed versions: 0.2.6

Complete source record
{
  "id": "cdbdeee94679a349e1c7d870ed2682fd157bdf6bf549ad7925bc3e319e5e2529",
  "url": "https://osv.dev/vulnerability/GHSA-2r3x-4mrv-mcxf",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Vyper: Memory corruption using function calls within tuples / nested calls",
    "summary": "### Impact When 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. Example code: ```python @internal def _foo(a: uint256, b: uint256, c: uint256) -> (uint256, uint256, uint256, uint256, uint256): return 1, a, b, c, 5 @internal def _foo2() -> uint256: a: uint256[10] = [6,7,8,9,10,11,12,13,15,16] return 4 @external def foo() -> (uint256, uint256, uint256, uint256, uint256): return self._foo(2, 3, self._foo2()) ``` Please see #2186 for further information ### Patches This problem was fixed in #2186, and released as a part of [`v0.2.6`](https://github.com/vyperlang/vyper/releases/tag/v0.2.6).",
    "evidence": "osv:GHSA-2r3x-4mrv-mcxf",
    "products": [
      {
        "name": {
          "value": "vyper",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "0.2.6",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "0.1.0b1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.1.0b10",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.1.0b11",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.1.0b12",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.1.0b13",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.1.0b14",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.1.0b15",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.1.0b16",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.1.0b17",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.1.0b2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.1.0b3",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.1.0b4",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.1.0b5",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.1.0b6",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.1.0b7",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.1.0b8",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.1.0b9",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.2.1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.2.2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.2.3",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.2.4",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.2.5",
            "evidence": "/affected/0/versions"
          }
        ]
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "GHSA-2r3x-4mrv-mcxf",
      "aliases": [
        "CVE-2020-37286",
        "GHSA-2r3x-4mrv-mcxf"
      ],
      "metrics": [
        {
          "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": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "0.2.6"
                }
              ]
            }
          ],
          "package": {
            "name": "vyper",
            "purl": "pkg:pypi/vyper",
            "ecosystem": "PyPI"
          },
          "versions": [
            "0.1.0b1",
            "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.1.0b2",
            "0.1.0b3",
            "0.1.0b4",
            "0.1.0b5",
            "0.1.0b6",
            "0.1.0b7",
            "0.1.0b8",
            "0.1.0b9",
            "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-2r3x-4mrv-mcxf/GHSA-2r3x-4mrv-mcxf.json"
          }
        }
      ],
      "modified": "2026-10-24T02:56:14.247608932Z",
      "provider": "osv",
      "references": [
        "https://github.com/vyperlang/vyper/security/advisories/GHSA-2r3x-4mrv-mcxf",
        "https://github.com/vyperlang/vyper/pull/2186",
        "https://github.com/vyperlang/vyper/commit/74ba67d4bec5f8be4f05759e37d2bfb1463e0441",
        "https://github.com/vyperlang/vyper",
        "https://github.com/vyperlang/vyper/releases/tag/v0.2.6"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-129"
        ],
        "severity": "MODERATE",
        "github_reviewed": true,
        "nvd_published_at": null,
        "github_reviewed_at": "2026-10-06T15:22:29Z"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2020-37286",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 428184,
  "published_at": "2026-10-06T15:22:29+00:00"
}