CVE-2024-24561 json
Vyper bounds check on built-in `slice()` function can be overflowed
published 2024-02-01 2 y ago modified 2026-09-10 1 mo ago also GHSA-9x7f-gwxq-6f2c , PYSEC-2024-149 , EUVD-2024-0176
- cvss
- 9.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.9%
- EPSS 0.9% chance of exploitation in 30 days, percentile 59%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi vyper 0.4.0, 0.4.0b1
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- total
- Assessed
- 2 y ago
Exploit prediction
0.90% chance of exploitation in the next 30 days, higher than 59% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/vyperlang/vyper/security/advisories/GHSA-9x7f-gwxq-6f2c referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | vyper | <0.4.0 <0.4.0b1 |
0.4.0 0.4.0b1 |
Affected products
- vyperlang vyper
Classification
References
-
github.com
/vyperlang/vyper/security/advisories/GHSA-9x7f-gwxq-6f2c
web, exploit, vendor-advisory, advisory
-
github.com
/vyperlang/vyper/issues/3756
web, issue-tracking, report
-
github.com
/vyperlang/vyper/blob/b01cd686aa567b32498fefd76bd96b0597c6f099/vyper/builtins/functions.py#L404-L457
web, product
-
nvd.nist.gov
/vuln/detail/CVE-2024-24561
advisory
-
github.com
/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2024-149.yaml
web
-
github.com
/vyperlang/vyper
package
Sources
- CVE List CVE-2024-24561
- GitHub Advisory GHSA-9x7f-gwxq-6f2c
- NVD CVE-2024-24561
- OSV PYSEC-2024-149
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.