Skip to main content
← All vulnerabilities
CVE-2024-24561PYSEC-2024-149GHSA-9X7F-GWXQ-6F2C

Vyper bounds check on built-in `slice()` function can be overflowed

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 0.4.0b1, 0.4.0
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: yes
  • Technical impact: total

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: yes · Technical impact: total

  3. Record last updated

Affected versions

  • vyperlang vyper

    through 0.3.10

  • vyperPyPI

    fixed in 0.4.0b1

  • vyperPyPI

    fixed in 0.4.0

References 3

GitHub · vyperlang/vyper