# CVE-2024-22419: concat built-in can corrupt memory in vyper

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.3
- **CVSS:** 7.3 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 1.01% (percentile 62, 2026-11-26)
- **CWE:** CWE-120
- **Aliases:** GHSA-2q8v-3gqq-4f8p, PYSEC-2024-103
- **Published:** 2024-01-18T18:45:55.731Z
- **Modified:** 2026-09-10T03:50:04.648Z

## Who should check

- Projects that depend on PyPI package vyper (\>= 0.3.0, \< 0.4.0)
- Anyone running vyperlang vyper \< 0.4.0

## 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

- PyPI `vyper`: affected \>= 0.3.0, \< 0.4.0; fixed 0.4.0, 0.4.0b1 (osv)
- vyperlang vyper: \< 0.4.0 (cvelist)

## Mitigation

- Upgrade vyper to one of 0.4.0, 0.4.0b1 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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.

## References

- vendor: <https://github.com/vyperlang/vyper/security/advisories/GHSA-2q8v-3gqq-4f8p>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2024-22419>
- patch: <https://github.com/vyperlang/vyper/commit/55e18f6d128b2da8986adbbcccf1cd59a4b9ad6f>
- exploit: <https://github.com/vyperlang/vyper/issues/3737>
- other: <https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2024-103.yaml>
- other: <https://github.com/vyperlang/vyper>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-22419>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-2q8v-3gqq-4f8p> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2024-103> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2024-22419> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-22419>
