CVE-2024-24560
Python vulnerability analysis and mitigation

Overview

Vyper, a Pythonic Smart Contract Language for Ethereum, was found to contain a vulnerability related to external call return data handling. The issue, identified as CVE-2024-24560, affects Vyper versions up to and including 0.3.10. The vulnerability was disclosed on February 2, 2024, and has been patched in version 0.4.0 (GitHub Advisory).

Technical details

The vulnerability occurs when making calls to external contracts. The system writes the input buffer starting at byte 28 and allocates the return buffer to start at byte 0, causing an overlap with the input buffer. When checking RETURNDATASIZE for dynamic types, the size is compared only to the minimum allowed size for that type, rather than the returned value's length. This implementation flaw can result in the contract misinterpreting data from the input buffer as return data (GitHub Advisory).

Impact

When a contract expects a dynamic type to be returned, and the part of the return data that is read as length includes a size larger than the actual RETURNDATASIZE, the return data read from the buffer will overrun the actual return data size and read from the input buffer. This can lead to malicious or mistaken contracts returning malformed data, resulting in overrunning the returned data and reading return data from the input buffer (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in Vyper version 0.4.0 through multiple pull requests (#3925, #4091, #4144, #4060). Users are advised to upgrade to this version or later to mitigate the 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-22033HIGH8.6
  • PythonPython
  • label-studio
NoNoJan 12, 2026
CVE-2025-68472HIGH8.1
  • PythonPython
  • mindsdb
NoYesJan 12, 2026
CVE-2026-22251MEDIUM5.3
  • PythonPython
  • wlc
NoYesJan 12, 2026
CVE-2026-22691LOW2.7
  • PythonPython
  • pypdf
NoYesJan 10, 2026
CVE-2026-22250LOW2.5
  • PythonPython
  • wlc
NoYesJan 12, 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