VYPR
Moderate severityNVD Advisory· Published Apr 25, 2024· Updated Aug 2, 2024

vyper performs double eval of raw_args in create_from_blueprint

CVE-2024-32647

Description

Vyper is a pythonic Smart Contract Language for the Ethereum virtual machine. In versions 0.3.10 and prior, using the create_from_blueprint builtin can result in a double eval vulnerability when raw_args=True and the args argument has side-effects. It can be seen that the _build_create_IR function of the create_from_blueprint builtin doesn't cache the mentioned args argument to the stack. As such, it can be evaluated multiple times (instead of retrieving the value from the stack). No vulnerable production contracts were found. Additionally, double evaluation of side-effects should be easily discoverable in client tests. As such, the impact is low. As of time of publication, no fixed versions exist.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Vyper's create_from_blueprint builtin in versions ≤0.3.10 has a double evaluation vulnerability when raw_args=True and args have side-effects, leading to potential logic errors.

Vulnerability

Overview

CVE-2024-32647 describes a double evaluation vulnerability in the Vyper smart contract language (versions 0.3.10 and prior). The bug resides in the create_from_blueprint builtin's _build_create_IR function, which fails to cache the args argument on the stack when raw_args=True. As a result, if the args expression has side-effects (e.g., modifying state or emitting events), those side-effects are executed multiple times instead of once [1][3].

Exploitation

Conditions

To exploit this vulnerability, an attacker must craft a Vyper contract that uses create_from_blueprint with raw_args=True and passes an args argument that produces side-effects. The double evaluation occurs during contract creation, potentially leading to unexpected behavior such as repeated state changes or resource exhaustion. No vulnerable production contracts have been identified, and the issue is considered easily discoverable through client-side testing [1].

Impact

Assessment

The impact is rated low because the double evaluation of side-effects is typically caught during development testing, and no real-world exploits have been reported. However, if left undetected, it could cause logical errors in deployed contracts, such as incorrect token minting or unauthorized state modifications [1].

Mitigation

Status

As of the publication date (2024-04-25), no official fix has been released. Users are advised to avoid using raw_args=True with side-effectful args expressions or to monitor the Vyper repository for a patched version. The PyPA advisory database also tracks this vulnerability [4].

AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
vyperPyPI
< 0.4.00.4.0

Affected products

1

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

5

News mentions

0

No linked articles in our index yet.