CVE-2023-42443: Vyper - Memory Corruption
- Cve: CVE-2023-42443
- Name: Vyper - Memory Corruption
- Description: Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine (EVM). In version 0.3.9 and prior, under certain conditions, the memory used by the builtins `raw_call`, `create_from_blueprint` and `create_copy_of` can be corrupted. For `raw_call`, the argument buffer of the call can be corrupted, leading to incorrect `calldata` in the sub-context. For `create_from_blueprint` and `create_copy_of`, the buffer for the to-be-deployed bytecode can be corrupted, leading to deploying incorrect bytecode. Each builtin has conditions that must be fulfilled for the corruption to happen. For `raw_call`, the `data` argument of the builtin must be `msg.data` and the `value` or `gas` passed to the builtin must be some complex expression that results in writing to the memory. For `create_copy_of`, the `value` or `salt` passed to the builtin must be some complex expression that results in writing to the memory. For `create_from_blueprint`, either no constructor parameters should be passed to the builtin or `raw_args` should be set to True, and the `value` or `salt` passed to the builtin must be some complex expression that results in writing to the memory. As of time of publication, no patched version exists. The issue is still being investigated, and there might be other cases where the corruption might happen. When the builtin is being called from an `internal` function `F`, the issue is not present provided that the function calling `F` wrote to memory before calling `F`. As a workaround, the complex expressions that are being passed as kwargs to the builtin should be cached in memory prior to the call to the builtin.
- Impact: Memory corruption can lead to incorrect calldata, deployment of malicious bytecode, and potential contract malfunction or exploitation.
- Remediation: No patched version exists yet; apply workaround by caching complex expressions in memory prior to calling the builtins.
- Vulnerability impact: data_tampering
- Requirements: Conditions must be fulfilled for each builtin, involving specific argument values and complex expressions resulting in memory writes.
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 8.1
- Cvss vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.00832
- Epss percentile: 0.58537
- Assignee: [email protected]
- Published at: 2023-09-18T21:16:13Z
- Age in days: 1163
- Modified at: 2026-06-17T06:23:50Z
- Patch available: yes
- Public exploits total: 1
- References total: 2
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2023-42443
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
- Not known: vulnerability type, requirement type, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-787 | Out-of-bounds Write |
Public exploits
| Url | Source | Added date |
|---|---|---|
| https://github.com/vyperlang/vyper/security/advisories/GHSA-c647-pxm2-c52w | nvd | 2023-09-18 |
References
| Url | Source | Tags |
|---|---|---|
| https://github.com/vyperlang/vyper/security/advisories/GHSA-c647-pxm2-c52w | nvd | Exploit, Patch, Vendor Advisory |
| https://github.com/vyperlang/vyper/issues/3609 | nvd | Issue Tracking, Vendor Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| vyperlang:vyper | < 0.3.10 | no | nvd | /v1/products/vyperlang/vyper |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| vyperlang/vyper | commit, fix, issues, package, pull, security_advisory | yes | /v1/repositories/vyperlang/vyper |
Index
- Repositories: 4
- Repositories high signal: 2
- Packages: 1
Exploitation
- Public exploit: yes
- Public exploit count: 1
- Public exploit first date: 2023-09-18
- Remote: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts