CVE-2024-24564: Vyper's extract32 Can Read Dirty Memory

vyper Updated 02 Oct 2025

Summary

26/02/2024
Yes i
Low
3.7

CVE-2024-24564: Vyper's extract32 can ready dirty memory. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Vyper is an open-source programming language for Ethereum smart contracts. It is designed to be secure, simple, and auditable. The extract32 function in Vyper is used to extract 32 bytes from a byte array. However, a vulnerability has been discovered in this function that can result in the reading of dirty memory.

Vulnerability Detail

The vulnerability occurs when the start index provided to the extract32 function updates the byte array (b) being extracted from. The function caches the pointer to b and its length before evaluating the start index. If the evaluation of the start index changes the content and length of b, an outdated length will be used with the new content when extracting 32 bytes. This can lead to the extraction of dirty memory. An attacker could potentially exploit this vulnerability to access sensitive information or manipulate the behavior of the smart contract.

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

As a temporary workaround, developers can avoid using the extract32 function in scenarios where the start index may update the byte array being extracted from. Instead, they can manually extract the desired bytes using other Vyper functions or by implementing custom extraction logic.

Conclusion

The vulnerability in Vyper's extract32 function can lead to the reading of dirty memory, potentially exposing sensitive information or enabling malicious manipulation of smart contract behavior. It is crucial for the Vyper development team to address this vulnerability by updating the function to handle changes in the byte array's content and length correctly. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for vyper →

Share this vulnerability

FAQ

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

The extract32 function in Vyper is used to extract 32 bytes from a byte array.

The vulnerability allows for the reading of dirty memory, potentially exposing sensitive information or enabling manipulation of smart contract behavior.

The Vyper development team should update the extract32 function to properly handle changes in the byte array's content and length during evaluation.

Developers can avoid using the extract32 function in scenarios where the start index may update the byte array being extracted from.

Related vulnerabilities

Recent vulnerabilities recorded for vyper.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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