CVE-2024-22419
concat built-in can corrupt memory in vyper
Also known as GHSA-2q8v-3gqq-4f8p, PYSEC-2024-103
Mitigation
- Upgrade vyper to one of 0.4.0, 0.4.0b1 (or later in the same release line).
Who should check
- Projects that depend on PyPI package vyper (>= 0.3.0, < 0.4.0)
- Anyone running vyperlang vyper < 0.4.0
Vulnerability facts
- Affected
- vyper >= 0.3.0, < 0.4.0
- Fixed in
- 0.4.0, 0.4.0b1
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- Yes: see the exploit references below
- Remote exploitation
- Remote, no login needed
- CVSS
- 7.3 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:LOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: Low
- Integrity impact: Low
- Availability impact: Low
- EPSS
- 1.01% chance of exploitation in 30 days (percentile 62, 2026-11-26)
- CWE
- CWE-120
- Modified
Description
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.
Affected and fixed versions
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2024-22419. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2024-22419.md Affected: vyper >= 0.3.0, < 0.4.0 Fixed in: 0.4.0, 0.4.0b1 Steps: 1. Search this machine and project for vyper (PyPI), vyperlang vyper: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Exploits and PoCs
FAQ
Is CVE-2024-22419 being exploited?
There is no confirmed exploitation: CVE-2024-22419 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 1.01% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2024-22419?
High: CVSS 7.3 (v3.1, scored by CNA). Remote, no login needed.
Which versions are affected by CVE-2024-22419?
vyper >= 0.3.0, < 0.4.0.
Is there a fix for CVE-2024-22419?
Yes. Fixed in 0.4.0, 0.4.0b1. Upgrade vyper to one of 0.4.0, 0.4.0b1 (or later in the same release line).
How do I check if I'm affected by CVE-2024-22419?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.