CyberAlerts is shutting down on June 30th, 2025. Thank you for your support!

CVE-2024-24561: Vyper bounds check on built-in `slice()` function can be overflowed

9.8 CVSS

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.

Classification

CVE ID: CVE-2024-24561

CVSS Base Severity: CRITICAL

CVSS Base Score: 9.8

CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Problem Types

CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer

Affected Products

Vendor: vyperlang

Product: vyper

Exploit Prediction Scoring System (EPSS)

EPSS Score: 0.91% (probability of being exploited)

EPSS Percentile: 74.82% (scored less or equal to compared to others)

EPSS Date: 2025-06-27 (when was this score calculated)

Stakeholder-Specific Vulnerability Categorization (SSVC)

SSVC Exploitation: poc

SSVC Technical Impact: total

SSVC Automatable: true

References

https://nvd.nist.gov/vuln/detail/CVE-2024-24561
https://github.com/vyperlang/vyper/security/advisories/GHSA-9x7f-gwxq-6f2c
https://github.com/vyperlang/vyper/issues/3756
https://github.com/vyperlang/vyper/blob/b01cd686aa567b32498fefd76bd96b0597c6f099/vyper/builtins/functions.py#L404-L457

Timeline