CVE-2024-24561
Python vulnerability analysis and mitigation

Overview

CVE-2024-24561 is a high-severity vulnerability in the Vyper programming language affecting versions <=0.3.10. The vulnerability exists in the built-in slice() function where the bounds check does not account for potential overflow when using non-literal arguments for the start or length parameters. This vulnerability was discovered and disclosed on January 31, 2024, affecting the core functionality of the Vyper language (GitHub Advisory).

Technical details

The vulnerability stems from an inadequate bounds check implementation in the slice() function. When calling slice() on a storage value, compile-time bounds checks only work if the start and length values are literals. For non-literal values, the runtime check performs a simple comparison (["assert", ["le", ["add", start, length], src_len]]) which fails to account for integer overflow scenarios. This oversight allows attackers to bypass the bounds check through arithmetic overflow, enabling out-of-bounds access to storage, memory, or calldata addresses (GitHub Advisory).

Impact

The vulnerability can be exploited in two main ways: 1) Out-of-bounds (OOB) access to storage, allowing attackers to potentially read unrelated storage slots and return unintended values, and 2) Length slot corruption, where attackers can manipulate the length parameter to read dirty memory. In most cases, this could result in forcing a zero return for the slice operation even when it shouldn't be possible (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in Vyper version 0.4.0. Users should upgrade to this version or later to mitigate the risk. The fix was implemented through PR #3818 (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