What’s Vulnerable › Vulnerabilities
CVE-2024-24561: Vyper bounds check on built-in `slice()` function can be overflowed
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.9% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2024-02-01 · updated 2026-06-17
- Weakness: CWE-119
Description
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.
Affected products
- vyperlang vyper: through 0.3.10
References
- https://github.com/vyperlang/vyper/blob/b01cd686aa567b32498fefd76bd96b0597c6f099/vyper/builtins/functions.py#L404-L457
- https://github.com/vyperlang/vyper/issues/3756
- https://github.com/vyperlang/vyper/security/advisories/GHSA-9x7f-gwxq-6f2c
- https://github.com/vyperlang/vyper/blob/b01cd686aa567b32498fefd76bd96b0597c6f099/vyper/builtins/functions.py#L404-L457
- https://github.com/vyperlang/vyper/issues/3756
- https://github.com/vyperlang/vyper/security/advisories/GHSA-9x7f-gwxq-6f2c
Get alerted when CVE-2024-24561 or the next vulnerability affects your stack