{"id":"CVE-2023-31146","published":"2023-05-11T20:51:51Z","modified":"2025-01-24T16:02:08Z","title":"Vyper vulnerable to OOB DynArray access when array is on both LHS and RHS of an assignment","vendor":"vyperlang","product":"vyper","tier":"tail","description":{"text":"Vyper is a Pythonic smart contract language for the Ethereum virtual machine. Prior to version 0.3.8, during codegen, the length word of a dynarray is written before the data, which can result in out-of-bounds array access in the case where the dynarray is on both the lhs and rhs of an assignment. The issue can cause data corruption across call frames. The expected behavior is to revert due to out-of-bounds array access. Version 0.3.8 contains a patch for this issue.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00871,"percentile":0.56463,"provenance":"source"},"cwes":[{"id":"CWE-787","name":"Out-of-bounds Write"}],"references":[{"url":"https://github.com/vyperlang/vyper/security/advisories/GHSA-3p37-3636-q8wv","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/vyperlang/vyper/commit/4f8289a81206f767df1900ac48f485d90fc87edb","tags":["x_refsource_MISC"]}],"priority":{"score":16.5,"factors":[{"name":"EPSS percentile","points":11.29},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"vyperlang","affectedVersions":[{"vendor":"vyperlang","product":"vyper","versions":["< 0.3.8"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2025-01-24T15:59:53.354621Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"vyper","vulnerableRanges":["<0.3.8"],"patched":["0.3.8"],"from":["GHSA-3p37-3636-q8wv","PYSEC-2023-77"],"provenance":"source"}],"summary":{"text":"Vyper, a Pythonic smart contract language for the Ethereum virtual machine, contains a flaw in its code generation: prior to version 0.3.8, the length word of a dynamic array is written before its data, which allows out-of-bounds array access when the same dynamic array appears on both the left and right sides of an assignment. An attacker can exploit this by triggering such an assignment, which corrupts data across call frames instead of reverting.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:17:30Z"},"euvd":{"id":"EUVD-2023-0270","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-vyperlang-vyper-cve-2022-24788","parents":[{"from":"CVE-2022-24788","to":"CVE-2023-31146","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["vyper/codegen/core.py"],"commits":["https://github.com/vyperlang/vyper/commit/049dbdc647b2ce838fae7c188e6bb09cf16e470b","https://github.com/vyperlang/vyper/commit/4f8289a81206f767df1900ac48f485d90fc87edb"],"basis":"shared function","functions":["_dynarray_make_setter"]}]},{"from":"CVE-2022-24845","to":"CVE-2023-31146","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["vyper/codegen/core.py"],"commits":["https://github.com/vyperlang/vyper/commit/049dbdc647b2ce838fae7c188e6bb09cf16e470b","https://github.com/vyperlang/vyper/commit/4f8289a81206f767df1900ac48f485d90fc87edb"],"basis":"shared function","functions":["_dynarray_make_setter"]}]}]}}