
Cloud Vulnerability DB
A community-led vulnerabilities database
Vyper, a pythonic Smart Contract Language for the Ethereum virtual machine, contains a vulnerability in its built-in extract32(b, start) function. The issue occurs when the start index parameter modifies the byte array b as a side effect, potentially leading to dirty memory being read and returned by the function. This vulnerability was discovered and disclosed in early 2024, affecting versions <=0.3.10, and has been fixed in version 0.4.0 (GitHub Advisory).
The vulnerability stems from a caching issue in the Extract32.build_IR function. While the function caches the pointer in memory/storage to b and its length, it fails to cache the actual content of b. Consequently, if the evaluation of the start parameter modifies b's content and length, the function uses an outdated length with the new content when extracting 32 bytes from b. This can result in accessing and returning unintended memory contents (GitHub Commit).
When exploited, the vulnerability causes the extract32 function to return dirty memory bytes instead of the expected output. This could potentially lead to unexpected behavior in smart contracts that rely on the extract32 function's output. The severity of this vulnerability has been assessed as Low, given its limited scope and impact (GitHub Advisory).
The vulnerability has been fixed in Vyper version 0.4.0. In this version, the compiler will panic instead of generating potentially vulnerable bytecode when it detects conditions that could lead to the issue. Users are advised to upgrade to version 0.4.0 or later to mitigate this vulnerability (GitHub Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."