# CVE-2025-47774: Vyper's \`slice()\` may elide side-effects when output length is 0

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

- **Severity:** LOW 2.9
- **CVSS:** 2.9 (v4.0, CNA) `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: Present; Privileges required: None; User interaction: None; Confidentiality impact: None; Integrity impact: Low; Availability impact: None; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None; Exploit maturity: Proof of concept
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.88% (percentile 57, 2026-11-26)
- **CWE:** CWE-691
- **Aliases:** GHSA-3vcg-j39x-cwfm, PYSEC-2026-2028
- **Published:** 2025-05-15T17:38:58.487Z
- **Modified:** 2026-07-07T17:57:17.629Z

## Who should check

- Projects that depend on PyPI package vyper (\<= 0.4.2rc1)
- Anyone running vyperlang vyper \<= 0.4.2rc1

## Description

Vyper is the Pythonic Programming Language for the Ethereum Virtual Machine. In versions up to and including 0.4.2rc1, the \`slice()\` builtin can elide side effects when the output length is 0, and the source bytestring is a builtin (\`msg.data\` or \`\<address\>.code\`). The reason is that for these source locations, the check that \`length \>= 1\` is skipped. The result is that a 0-length bytestring constructed with slice can be passed to \`make\_byte\_array\_copier\`, which elides evaluation of its source argument when the max length is 0. The impact is that side effects in the \`start\` argument may be elided when the \`length\` argument is 0, e.g. \`slice(msg.data, self.do\_side\_effect(), 0)\`. The fix in pull request 4645 disallows any invocation of \`slice()\` with length 0, including for the ad hoc locations discussed in this advisory. The fix is expected to be part of version 0.4.2.

## Affected and fixed versions

- PyPI `vyper`: affected \<= 0.4.2rc1; fixed no fix listed yet (osv)
- vyperlang vyper: \<= 0.4.2rc1 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-47774.md
Affected: vyper <= 0.4.2rc1
Fixed in: no fixed version listed yet

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-2025-47774 being exploited?

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

### How serious is CVE-2025-47774?

Low: CVSS 2.9 (v4.0, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2025-47774?

vyper \<= 0.4.2rc1.

### Is there a fix for CVE-2025-47774?

No fixed version is listed in the sources yet. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2025-47774?

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-3vcg-j39x-cwfm>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2025-47774>
- vendor: <https://github.com/advisories/GHSA-3vcg-j39x-cwfm>
- patch: <https://github.com/vyperlang/vyper/pull/4645>
- other: <https://github.com/vyperlang/vyper/blob/68b68c4b30c5ef2f312b4674676170b8a6eaa316/vyper/builtins/functions.py#L315-L319>
- other: <https://github.com/vyperlang/vyper/blob/68b68c4b30c5ef2f312b4674676170b8a6eaa316/vyper/codegen/core.py#L189-L191>
- other: <https://github.com/vyperlang/vyper>
- other: <https://pypi.org/project/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-2025-47774>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-3vcg-j39x-cwfm> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2026-2028> (license: <https://creativecommons.org/licenses/by/4.0/>)

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