Buffer overflow in Vyperlang Vyper
CVE-2024-22419
Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine. The `concat` built-in can write over the bounds of the memory buffer that was allocated for it and thus overwrite existing valid data. The root cause is that the `build_IR` for `concat` doesn't properly adhere to the API of copy functions (for `>=0.3.2` the `copy_bytes` function). A contract search was performed and no vulnerable contracts were found in production. The buffer overflow can result in the change of semantics of the contract. The overflow is length-dependent and thus it might go unnoticed during contract testing. However, certainly not all usages of concat will result in overwritten valid data as we require it to be in an internal function and close to the return statement where other memory allocations don't occur. This issue has been addressed in 0.4.0.
Vulnerability class: Buffer Overflow
EPSS: 0.008 (53.2th percentile) — read the EPSS interpretation.
CVSS v3 metric
CVSS v3 base score 7.3 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L.
Affected products
- Vyperlang Vyper — versions < 0.4.0
Weakness classification (CWE)
References
- security-advisories@github.com (x_refsource_CONFIRM, Exploit, Vendor Advisory)
- security-advisories@github.com (Exploit, x_refsource_MISC, Issue Tracking, Vendor Advisory)
- security-advisories@github.com (Patch, x_refsource_MISC)
Frequently asked questions
- What is CVE-2024-22419?
- CVE-2024-22419 is a high-severity vulnerability in Vyperlang Vyper, classified under Buffer Copy without Checking Size of Input (Classic Buffer Overflow). CVSS score: 7.3/10. Published 2024-01-18.
- How severe is CVE-2024-22419?
- High severity. CVSS v3 base score is 7.3 out of 10.