{"id":"CVE-2020-37287","aliases":["EUVD-2020-31283","GHSA-4v7v-gqf9-ww2g","GHSA-cqxq-3fq9-6g4p"],"status":"published","title":"Vyper before 0.2.6 Call Stack Corruption via Complex Type Function Arguments","description":"Vyper before 0.2.6 contains a call stack corruption vulnerability that causes incorrect function outputs when complex types with non-base members are passed as arguments. Contracts passing multi-dimensional arrays or structs to internal or external functions receive corrupted values because the compiler assumed each subtype size is 32.","severity":{"version":"4.0","score":8.2,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00251,"percentile":0.16715,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-131","CWE-682"],"published":"2026-10-06T15:22:23Z","modified":"2026-10-30T02:45:07Z","fixes":[{"ecosystem":"PyPI","package":"vyper","fixed_in":["0.2.6"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"vyper","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.2.6"}]}]},{"source":"osv","ecosystem":"PyPI","package":"vyper","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.2.6"}]}],"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"]}],"products":[{"vendor":"vyperlang","product":"vyper"}],"references":[{"url":"https://github.com/vyperlang/vyper/security/advisories/GHSA-4v7v-gqf9-ww2g","tags":["vendor-advisory","advisory","web"]},{"url":"https://www.vulncheck.com/advisories/vyper-before-0.2.6-call-stack-corruption-via-complex-type-function-arguments","tags":["third-party-advisory","advisory"]},{"url":"https://github.com/vyperlang/vyper/issues/2183","tags":["web"]},{"url":"https://github.com/vyperlang/vyper/pull/2184","tags":["web"]},{"url":"https://github.com/vyperlang/vyper/commit/0be02b7331e8febe79d5a4218829c72e30417a29","tags":["web"]},{"url":"https://github.com/vyperlang/vyper/releases/tag/v0.2.6","tags":["web"]},{"url":"https://github.com/advisories/GHSA-4v7v-gqf9-ww2g"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-37287"},{"url":"https://github.com/advisories/GHSA-cqxq-3fq9-6g4p"},{"url":"https://github.com/vyperlang/vyper","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2020-37287","title":"Vyper before 0.2.6 Call Stack Corruption via Complex Type Function Arguments","description":"Vyper before 0.2.6 contains a call stack corruption vulnerability that causes incorrect function outputs when complex types with non-base members are passed as arguments. Contracts passing multi-dimensional arrays or structs to internal or external functions receive corrupted values because the compiler assumed each subtype size is 32.","status":"published","published":"2026-10-21T00:36:16.257Z","modified":"2026-10-28T15:00:19.8Z","cvss":[{"version":"4.0","score":8.2,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","level":"high","assessor":"cna"},{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-131"],"updated_at":"2026-11-02T14:35:47.22408Z"}],"euvd":[{"id":"EUVD-2020-31283","description":"Vyper before 0.2.6 contains a call stack corruption vulnerability that causes incorrect function outputs when complex types with non-base members are passed as arguments. Contracts passing multi-dimensional arrays or structs to internal or external functions receive corrupted values because the compiler assumed each subtype size is 32.","status":"published","published":"2026-10-21T00:36:16Z","modified":"2026-10-28T15:00:19Z","cvss":[{"version":"4.0","score":8.2,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","level":"high"}],"updated_at":"2026-11-02T16:59:20.750321Z"}],"ghsa":[{"id":"GHSA-4v7v-gqf9-ww2g","title":"Vyper: Call stack corruption when passing complex type containing non-base type members as argument","description":"### 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) -\u003e (int128[2][1], int128):\n    return arr, i\n\n@external\ndef test_values(arr: int128[2][1], i: int128) -\u003e (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).","status":"published","published":"2026-10-06T15:22:23Z","modified":"2026-10-06T15:22:24Z","cvss":[{"version":"4.0","score":6.9,"vector":"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","level":"medium"}],"cwes":["CWE-682"],"updated_at":"2026-11-02T14:41:27.036917Z"},{"id":"GHSA-cqxq-3fq9-6g4p","title":"Vyper before 0.2.6 contains a call stack corruption vulnerability that causes incorrect function...","description":"Vyper before 0.2.6 contains a call stack corruption vulnerability that causes incorrect function outputs when complex types with non-base members are passed as arguments. Contracts passing multi-dimensional arrays or structs to internal or external functions receive corrupted values because the compiler assumed each subtype size is 32.","status":"published","published":"2026-10-21T03:32:11Z","modified":"2026-10-21T03:32:12Z","cvss":[{"version":"4.0","score":8.2,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high"},{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"medium"}],"cwes":["CWE-131"],"updated_at":"2026-11-02T15:14:08.480034Z"}],"nvd":[{"id":"CVE-2020-37287","description":"Vyper before 0.2.6 contains a call stack corruption vulnerability that causes incorrect function outputs when complex types with non-base members are passed as arguments. Contracts passing multi-dimensional arrays or structs to internal or external functions receive corrupted values because the compiler assumed each subtype size is 32.","status":"published","published":"2026-10-21T01:17:18.54Z","modified":"2026-10-28T15:17:01.293Z","cvss":[{"version":"4.0","score":8.2,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high","assessor":"secondary"},{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"medium","assessor":"secondary"}],"cwes":["CWE-131"],"updated_at":"2026-11-02T14:06:48.879919Z"}],"osv":[{"id":"CVE-2020-37287","description":"Vyper before 0.2.6 contains a call stack corruption vulnerability that causes incorrect function outputs when complex types with non-base members are passed as arguments. Contracts passing multi-dimensional arrays or structs to internal or external functions receive corrupted values because the compiler assumed each subtype size is 32.","status":"published","published":"2026-10-21T01:17:18.54Z","modified":"2026-10-30T02:45:07.680555412Z","cvss":[{"version":"4.0","score":8.2,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high"}],"updated_at":"2026-11-02T15:44:16.936975Z"},{"id":"GHSA-4v7v-gqf9-ww2g","title":"Vyper: Call stack corruption when passing complex type containing non-base type members as argument","description":"### 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) -\u003e (int128[2][1], int128):\n    return arr, i\n\n@external\ndef test_values(arr: int128[2][1], i: int128) -\u003e (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).","status":"published","published":"2026-10-06T15:22:23Z","modified":"2026-10-24T02:56:14.103757499Z","cvss":[{"version":"4.0","score":6.9,"vector":"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","level":"medium"}],"cwes":["CWE-682"],"updated_at":"2026-11-02T15:46:37.528068Z"}]}}
