{"id":"CVE-2024-24560","published":"2024-02-02T16:19:45Z","modified":"2024-08-01T23:19:52Z","title":"Vyper external calls can overflow return data to return input buffer","vendor":"vyperlang","product":"vyper","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":3.7,"severity":"LOW","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00589,"percentile":0.42115,"provenance":"source"},"cwes":[{"id":"CWE-119","name":"Improper Restriction of Operations within the Bounds of a Memory Buffer"}],"references":[{"url":"https://github.com/vyperlang/vyper/security/advisories/GHSA-gp3w-2v2m-p686","tags":["x_refsource_CONFIRM"]}],"priority":{"score":11.0,"factors":[{"name":"EPSS percentile","points":8.42},{"name":"CVSS severity","points":2.59}]},"vendorSlug":"vyperlang","affectedVersions":[{"vendor":"vyperlang","product":"vyper","versions":["<= 0.3.10"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2024-06-26T14:31:50.296984Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"vyper","vulnerableRanges":["<0.4.0","<0.4.0b1"],"patched":["0.4.0","0.4.0b1"],"from":["GHSA-gp3w-2v2m-p686","PYSEC-2024-148"],"provenance":"source"}],"summary":{"text":"An attacker who controls or can induce a called contract to return malformed ABIv2 data can cause the calling contract to read stale input-buffer contents in place of the returned data, which is an out-of-bounds memory read with a confidentiality-only effect on the calling contract; exploitation requires that the called contract return invalid encoding and that the vulnerable calling contract depend on that return value.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:59:17Z"},"euvd":{"id":"EUVD-2024-0175","exploited":false,"provenance":"source"}}