CVE-2024-22419 json
concat built-in can corrupt memory in vyper
published 2024-01-18 2 y ago modified 2026-09-10 1 mo ago also GHSA-2q8v-3gqq-4f8p , PYSEC-2024-103 , EUVD-2024-0173
- cvss
- 7.3
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.8%
- EPSS 0.8% chance of exploitation in 30 days, percentile 55%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 18 mo ago
Exploit prediction
0.77% chance of exploitation in the next 30 days, higher than 55% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/vyperlang/vyper/security/advisories/GHSA-2q8v-3gqq-4f8p referenced PoC, tagged "exploit" by a source, unverified
- github.com https://github.com/vyperlang/vyper/issues/3737 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | vyper | >=0.3.0, <0.4.0 <0.4.0b1 |
0.4.0 0.4.0b1 |
Affected products
- vyperlang vyper
Classification
References
-
github.com
/vyperlang/vyper/commit/55e18f6d128b2da8986adbbcccf1cd59a4b9ad6f
web, patch
-
github.com
/vyperlang/vyper/security/advisories/GHSA-2q8v-3gqq-4f8p
web, exploit, vendor-advisory, advisory
-
github.com
/vyperlang/vyper/issues/3737
web, exploit, issue-tracking, vendor-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2024-22419
advisory
-
github.com
/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2024-103.yaml
web
-
github.com
/vyperlang/vyper
package
Sources
- CVE List CVE-2024-22419
- GitHub Advisory GHSA-2q8v-3gqq-4f8p
- NVD CVE-2024-22419
- OSV PYSEC-2024-103
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.