{"id":"CVE-2024-24561","published":"2024-02-01T16:37:01Z","modified":"2025-06-17T21:29:22Z","title":"Vyper bounds check on built-in `slice()` function can be overflowed","vendor":"vyperlang","product":"vyper","tier":"tail","description":{"text":"Vyper is a pythonic Smart Contract Language for the ethereum virtual machine. In versions 0.3.10 and earlier, the bounds check for slices does not account for the ability for start + length to overflow when the values aren't literals. If a slice() function uses a non-literal argument for the start or length variable, this creates the ability for an attacker to overflow the bounds check. This issue can be used to do OOB access to storage, memory or calldata addresses. It can also be used to corrupt the length slot of the respective array.\n\n","provenance":"source","from":"CVE.org"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00902,"percentile":0.60574,"provenance":"source"},"cwes":[{"id":"CWE-119","name":"Improper Restriction of Operations within the Bounds of a Memory Buffer"}],"references":[{"url":"https://github.com/vyperlang/vyper/security/advisories/GHSA-9x7f-gwxq-6f2c","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/vyperlang/vyper/issues/3756","tags":["x_refsource_MISC"]},{"url":"https://github.com/vyperlang/vyper/blob/b01cd686aa567b32498fefd76bd96b0597c6f099/vyper/builtins/functions.py#L404-L457","tags":["x_refsource_MISC"]}],"priority":{"score":19.0,"factors":[{"name":"EPSS percentile","points":12.11},{"name":"CVSS severity","points":6.86}]},"vendorSlug":"vyperlang","affectedVersions":[{"vendor":"vyperlang","product":"vyper","versions":["<= 0.3.10"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total","timestamp":"2024-02-01T19:07:48.299711Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"vyper","vulnerableRanges":["<0.4.0","<0.4.0b1"],"patched":["0.4.0","0.4.0b1"],"from":["GHSA-9x7f-gwxq-6f2c","PYSEC-2024-149"],"provenance":"source"}],"summary":{"text":"The Vyper smart contract language (versions 0.3.10 and earlier) has a bounds check in its built-in slice() function that fails to account for integer overflow of start + length when those arguments are non-literal values. An attacker who can get a contract compiled with such a slice() call to receive crafted non-literal inputs can overflow the check, enabling out-of-bounds reads and writes to storage, memory, or calldata and corruption of array length slots, with network access and no privileges or user interaction required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:16:31Z"},"euvd":{"id":"EUVD-2024-0176","exploited":false,"provenance":"source"}}