# CVE-2023-42443: Vyper vulnerable to memory corruption in certain builtins utilizing \`msize\`

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

- **Severity:** HIGH 8.1
- **CVSS:** 8.1 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.86% (percentile 56, 2026-11-26)
- **CWE:** CWE-787
- **Aliases:** GHSA-c647-pxm2-c52w, PYSEC-2023-306
- **Published:** 2023-09-18T20:52:33.664Z
- **Modified:** 2026-06-17T06:23:50.420Z

## Who should check

- Projects that depend on PyPI package vyper (\>= 0.3.4, \< 0.3.10)
- Anyone running vyperlang vyper \<= 0.3.9

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

## Affected and fixed versions

- PyPI `vyper`: affected \>= 0.3.4, \< 0.3.10; fixed 0.3.10 (osv)
- vyperlang vyper: \<= 0.3.9 (cvelist)

## Mitigation

- Upgrade vyper to 0.3.10 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-42443. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-42443.md
Affected: vyper >= 0.3.4, < 0.3.10
Fixed in: 0.3.10

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-2023-42443 being exploited?

There is no confirmed exploitation: CVE-2023-42443 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.86% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-42443?

High: CVSS 8.1 (v3.1, scored by CNA). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2023-42443?

vyper \>= 0.3.4, \< 0.3.10.

### Is there a fix for CVE-2023-42443?

Yes. Fixed in 0.3.10. Upgrade vyper to 0.3.10 or later.

### How do I check if I'm affected by CVE-2023-42443?

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-c647-pxm2-c52w>
- vendor: <https://github.com/vyperlang/vyper/issues/3609>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2023-42443>
- patch: <https://github.com/vyperlang/vyper/pull/3610>
- patch: <https://github.com/vyperlang/vyper/commit/79303fc4fcba06994ee5c6a7baef57bdb185006c>
- other: <https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2023-306.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-2023-42443>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-c647-pxm2-c52w> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2023-306> (license: <https://creativecommons.org/licenses/by/4.0/>)

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