
Cloud Vulnerability DB
A community-led vulnerabilities database
A vulnerability (GHSA-mr6r-mvw4-736g) was discovered in Vyper versions <= 0.1.0b16, disclosed on March 9, 2020, by security researcher montyly from Trail of Bits. The issue affects Vyper interfaces that return integer types less than 256 bits when uint256 is used, particularly impacting users who make assumptions about interface return type values (GitHub Advisory).
The vulnerability stems from three main technical aspects: First, the ABI Specification is under-defined, allowing functions returning uint8 to actually return a 32-byte integer, making it identical to uint256 returns without requiring explicit casting or validation. Second, Vyper was designed without uint8 types, initially having only one numeric type. Third, this particularly affects functions like ERC20.decimals() which returns uint8 type (GitHub Advisory).
The vulnerability has been assessed as having low severity. It could potentially allow attackers to manipulate or bypass certain logic in smart contracts that rely on functions returning values less than 256 bits, particularly if these values are used for important functionality without proper validation. For instance, an unexpectedly large value (>255) returned by a malicious contract could exploit this behavior (GitHub Advisory).
While no patched version is currently available that provides users access to the uint8 type, a straightforward workaround exists. Developers should implement explicit bounds checking for values returned by interfaces specifying uint8. The recommended fix is to add an assertion to ensure the returned value is within uint8 bounds (assert decimals < 256). The Vyper team is working on refactoring their typing system to implement all ABI-compliant integer types (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."