# CVE-2024-24560: Vyper external calls can overflow return data to return input buffer

- Severity: Low 3.7 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.53%, higher than 46% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-02-02T16:19:45.822Z
- Modified: 2026-09-10T03:50:05.649Z
- Also known as: GHSA-gp3w-2v2m-p686, PYSEC-2024-148
- Weaknesses: CWE-119
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- vyperlang vyper: <= 0.3.10; up to 0.3.10
- vyper (PyPI): before 0.4.0; before 0.4.0b1

## Every score

- GitHub_M: CVSS:3.1 3.7 Low `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N`
- GitHub: CVSS:3.1 3.7 Low `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N`
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- PyPA Advisory Database: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`

## References

- <https://github.com/vyperlang/vyper/security/advisories/GHSA-gp3w-2v2m-p686> (exploit, advisory, vendor-advisory, web)
- <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)

## Sources

- CVE List: [CVE-2024-24560](https://www.cve.org/CVERecord?id=CVE-2024-24560), CVE Terms of Use, modified 2024-08-01
- GitHub Advisory Database: [GHSA-gp3w-2v2m-p686](https://github.com/advisories/GHSA-gp3w-2v2m-p686), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2024-24560](https://nvd.nist.gov/vuln/detail/CVE-2024-24560), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2024-148](https://osv.dev/vulnerability/PYSEC-2024-148), CC-BY-4.0, modified 2024-11-21

---

Page: https://cve.day/CVE-2024-24560 · Whole record: https://cve.day/CVE-2024-24560.json · Rebuilt by cve.day 2026-11-25T22:58:36.529Z
