CVE-2024-32646: Vyper - Double Eval Vulnerability in Slice Builtin

vyper Updated 02 Oct 2025

Summary

25/04/2024
Yes i
Moderate
5.3

CVE-2024-32646: vyper performs double eval of the slice start/length args in certain cases. Affects vyper versions < 0.4.0. Fixed in 0.4.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Vyper is an open-source programming language used for developing smart contracts on the Ethereum blockchain. It is designed to be secure, simple, and auditable. The Vyper package, available on PyPI, provides the necessary tools and libraries for writing Vyper contracts. However, a vulnerability has been discovered in the slice builtin function of Vyper.

Vulnerability Detail

The vulnerability in Vyper's slice builtin function arises when the buffer argument is either msg.data, self.code, or <address>.code, and the start or length arguments have side-effects. The _build_adhoc_slice_node function of the slice builtin does not cache these arguments to the stack, resulting in multiple evaluations instead of retrieving the value from the stack. This vulnerability can lead to unexpected behavior and potential security risks.

How To Fix

Latest published version: 0.4.3 as of 22 Oct 2026

pip install --upgrade "vyper==0.4.3"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.4.0

This is the first release that contains the fix.

pip install --upgrade "vyper==0.4.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround provided for this vulnerability. It is recommended to update to a fixed version of Vyper.

Conclusion

The double eval vulnerability in the slice builtin function of Vyper can pose potential security risks in contracts utilizing the vulnerable code. It is crucial to update to a fixed version of Vyper to ensure the vulnerability is patched. For further support and assistance, please contact DevNack.com.

See every vulnerability recorded for vyper →

Share this vulnerability

FAQ

Vyper is an open-source programming language used for developing smart contracts on the Ethereum blockchain. It is designed to be secure, simple, and auditable.

The impact of this vulnerability can vary depending on the specific usage of the slice builtin function. It can potentially lead to unexpected behavior and security risks in contracts that utilize the vulnerable code.

No known exploits of this vulnerability have been reported at this time. However, it is important to update to a fixed version of Vyper to mitigate any potential risks.

You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply provide your Pipfile.lock and the playground will analyze your dependencies and alert you if any vulnerabilities are found.

For further support on vulnerability remediation, you can reach out to info@devnack.com. Our team of experts will be happy to assist you.

Related vulnerabilities

Recent vulnerabilities recorded for vyper.

How To Fix

Latest published version: 0.4.3 as of 22 Oct 2026

pip install --upgrade "vyper==0.4.3"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.4.0

This is the first release that contains the fix.

pip install --upgrade "vyper==0.4.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback