CVE-2024-24561
Vyper's bounds check on built-in `slice()` function can be overflowed
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.
How to fix CVE-2024-24561
To remediate CVE-2024-24561, upgrade the affected package to a fixed version below.
- —upgrade to 0.4.0 or later
- —upgrade to 0.4.0b1 or later
Is CVE-2024-24561 being exploited?
Low — EPSS is 1.2%, meaning exploitation activity has not been observed at scale.
Affected packages (2)
- from 0, < 0.4.0
- from 0, < 0.4.0b1
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | CRITICAL9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |