CVE-2024-24560
MEDIUM 5.3CVSS 3.1Vyper's external calls can overflow return data to return input buffer
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.
- Published
- 2 Feb 2024
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-119
- Also known as
- GHSA-gp3w-2v2m-p686PYSEC-2024-148
- Sources
- NVDJSONOSV GHSA-gp3w-2v2m-p686JSONOSV PYSEC-2024-148JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| OSV | PyPA | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | LOW 3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | LOW 3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | vyperlang | vypercpe:2.3:a:vyperlang:vyper:*:*:*:*:*:python:*:* |
<= 0.3.10 | |
| OSV | PyPI | vyper | < 0.4.0 | 0.4.0 |
| OSV | PyPI | vyper | < 0.4.0b1 | 0.4.0b1 |
References
- https://github.com/vyperlang/vyper/security/advisories/GHSA-gp3w-2v2m-p686 · Exploit, Vendor Advisory, WEB, ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2024-24560 · ADVISORY
- https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2024-148.yaml · WEB
- https://github.com/vyperlang/vyper · PACKAGE
History
- 25 Nov 2026 20:54 UTC · NVD: first stored (published 2 Feb 2024)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 2 Feb 2024)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 2 Feb 2024)