CVE-2024-24564
Python vulnerability analysis and mitigation

Overview

Vyper, a pythonic Smart Contract Language for the Ethereum virtual machine, contains a vulnerability in its built-in extract32(b, start) function. The issue occurs when the start index parameter modifies the byte array b as a side effect, potentially leading to dirty memory being read and returned by the function. This vulnerability was discovered and disclosed in early 2024, affecting versions <=0.3.10, and has been fixed in version 0.4.0 (GitHub Advisory).

Technical details

The vulnerability stems from a caching issue in the Extract32.build_IR function. While the function caches the pointer in memory/storage to b and its length, it fails to cache the actual content of b. Consequently, if the evaluation of the start parameter modifies b's content and length, the function uses an outdated length with the new content when extracting 32 bytes from b. This can result in accessing and returning unintended memory contents (GitHub Commit).

Impact

When exploited, the vulnerability causes the extract32 function to return dirty memory bytes instead of the expected output. This could potentially lead to unexpected behavior in smart contracts that rely on the extract32 function's output. The severity of this vulnerability has been assessed as Low, given its limited scope and impact (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been fixed in Vyper version 0.4.0. In this version, the compiler will panic instead of generating potentially vulnerable bytecode when it detects conditions that could lead to the issue. Users are advised to upgrade to version 0.4.0 or later to mitigate this vulnerability (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-22871HIGH8.7
  • PythonPython
  • guarddog
NoYesJan 13, 2026
GHSA-58pv-8j8x-9vj2HIGH8.6
  • PythonPython
  • jaraco.context
NoYesJan 13, 2026
CVE-2026-22779MEDIUM6.3
  • PythonPython
  • blacksheep
NoYesJan 14, 2026
CVE-2026-21889LOW2.3
  • PythonPython
  • weblate
NoYesJan 14, 2026
CVE-2025-68492LOW2.3
  • PythonPython
  • chainlit
NoYesJan 14, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management