CVE-2024-24561
CRITICAL 9.8CVSS 3.1Vyper's bounds check on built-in `slice()` function can be overflowed
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.
- Published
- 1 Feb 2024
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-119CWE-787
- Also known as
- GHSA-9x7f-gwxq-6f2cPYSEC-2024-149
- Sources
- NVDJSONOSV GHSA-9x7f-gwxq-6f2cJSONOSV PYSEC-2024-149JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | PyPA | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | vyperlang | vypercpe:2.3:a:vyperlang:vyper:*:*:*:*:*:python:*:* |
<= 0.3.10 | |
| OSV | PyPI | vyper | < 0.4.0 | 0.4.0 |
| OSV | PyPI | vyper | < 0.4.0b1 | 0.4.0b1 |
References
- https://github.com/vyperlang/vyper/blob/b01cd686aa567b32498fefd76bd96b0597c6f099/vyper/builtins/functions.py#L404-L457 · Product, WEB
- https://github.com/vyperlang/vyper/issues/3756 · Issue Tracking, WEB, REPORT
- https://github.com/vyperlang/vyper/security/advisories/GHSA-9x7f-gwxq-6f2c · Exploit, Vendor Advisory, WEB, ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2024-24561 · ADVISORY
- https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2024-149.yaml · WEB
- https://github.com/vyperlang/vyper · PACKAGE
History
- 25 Nov 2026 20:54 UTC · NVD: first stored (published 1 Feb 2024)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 1 Feb 2024)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 1 Feb 2024)