CVE-2024-24560

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-24560
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-24560.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-24560
Aliases
Published
2024-02-02T16:19:45Z
Modified
2025-10-21T19:32:53Z
Severity
  • 3.7 (Low) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N CVSS Calculator
Summary
Vyper external calls can overflow return data to return input buffer
Details

Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine. When calls to external contracts are made, we write the input buffer starting at byte 28, and allocate the return buffer to start at byte 0 (overlapping with the input buffer). When checking RETURNDATASIZE for dynamic types, the size is compared only to the minimum allowed size for that type, and not to the returned value's length. As a result, malformed return data can cause the contract to mistake data from the input buffer for returndata. When the called contract returns invalid ABIv2 encoded data, the calling contract can read different invalid data (from the dirty buffer) than the called contract returned.

Database specific
{
    "cwe_ids": [
        "CWE-119"
    ]
}
References

Affected packages

Git /

Affected ranges