PT-2024-24742 · Vyper · Vyper

Cyberthirst

·

Published

2024-04-25

·

Updated

2025-01-02

·

CVE-2024-32649

CVSS v3.1

5.3

Medium

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Name of the Vulnerable Software and Affected Versions Vyper versions 0.3.10 and prior
Description The issue arises from using the sqrt builtin in Vyper, which can result in a double eval vulnerability when the argument has side-effects. This occurs because the build IR function of the sqrt builtin does not cache the argument to the stack, leading to multiple evaluations instead of retrieving the value from the stack. The impact is considered low, and no vulnerable production contracts were found.
Recommendations For Vyper versions 0.3.10 and prior, consider avoiding the use of the sqrt builtin with arguments that have side-effects until a fixed version is available. As a temporary workaround, consider modifying the build IR function to cache the argument to the stack or restrict the use of the sqrt builtin in sensitive areas of the code. At the moment, there is no information about a newer version that contains a fix for this vulnerability.

Exploit

Eval Injection

Weakness Enumeration

Related Identifiers

CVE-2024-32649
GHSA-5JRJ-52X8-M64H
PYSEC-2024-209

Affected Products

Vyper