CVE-2024-24560
published 2024-02-02CVE-2024-24560: 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…
PriorityP426medium5.3CVSS 3.1
AVNACLPRNUINSUCLINAN
EPSS
0.53%
40.9th percentile
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.
Affected
3 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| vyperlang | vyper | <= 0.3.10 | — |
| vyperlang | vyper | >= 0 < 0.4.0 | 0.4.0 |
| vyperlang | vyper | >= 0 < 0.4.0b1 | 0.4.0b1 |
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
Vyper's external calls can overflow return data to return input buffer
ghsa·2024-02-02
CVE-2024-24560 [LOW] CWE-119 Vyper's external calls can overflow return data to return input buffer
Vyper's external calls can overflow return data to return input buffer
## Summary
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.
This advisory is given a severity of "Low" because 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.
## Details
When arguments are packed fo
OSV
Vyper's external calls can overflow return data to return input buffer
osv·2024-02-02
CVE-2024-24560 [LOW] Vyper's external calls can overflow return data to return input buffer
Vyper's external calls can overflow return data to return input buffer
## Summary
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.
This advisory is given a severity of "Low" because 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.
## Details
When arguments are packed fo
OSV
CVE-2024-24560: Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine
osv·2024-02-02
CVE-2024-24560 CVE-2024-24560: Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine
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.
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
2024-02-02
Published