# CVE-2025-47285: Vyper's `concat()` builtin may elide side-effects for zero-length arguments

- Severity: Low 2.9 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.47%, higher than 42% of CVEs (2026-12-01)
- Published: 2025-05-15T17:24:03.442Z
- Modified: 2026-07-07T17:56:14.307Z
- Also known as: GHSA-qhr6-mgqr-mchm, PYSEC-2026-2029
- Weaknesses: CWE-691
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

Vyper is the Pythonic Programming Language for the Ethereum Virtual Machine. In versions up to and including 0.4.2rc1, `concat()` may skip evaluation of side effects when the length of an argument is zero. This is due to a fastpath in the implementation which skips evaluation of argument expressions when their length is zero. In practice, it would be very unusual in user code to construct zero-length bytestrings using an expression with side-effects, since zero-length bytestrings are typically constructed with the empty literal `b""`; the only way to construct an empty bytestring which has side effects would be with the ternary operator introduced in v0.3.8, e.g. `b"" if self.do_some_side_effect() else b""`. The fix is available in pull request 4644 and expected to be part of the 0.4.2 release. As a workaround, don't have side effects in expressions which construct zero-length bytestrings.

(As written by CVE List.)

## Affected

- vyperlang vyper: <= 0.4.2rc1
- vyper (PyPI): up to 0.4.2rc1

## Every score

- GitHub_M: CVSS:4.0 2.9 Low `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`
- GitHub: CVSS:4.0 Low `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`
- PyPA Advisory Database: CVSS:4.0 `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`

## References

- <https://github.com/vyperlang/vyper/security/advisories/GHSA-qhr6-mgqr-mchm> (web)
- <https://github.com/vyperlang/vyper/pull/4644> (web)
- <https://github.com/vyperlang/vyper/blob/68b68c4b30c5ef2f312b4674676170b8a6eaa316/vyper/builtins/functions.py#L560-L562> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-47285> (advisory)
- <https://github.com/vyperlang/vyper> (package)
- <https://pypi.org/project/vyper> (package)
- <https://github.com/advisories/GHSA-qhr6-mgqr-mchm> (advisory)

## Sources

- CVE List: [CVE-2025-47285](https://www.cve.org/CVERecord?id=CVE-2025-47285), CVE Terms of Use, modified 2025-05-15
- GitHub Advisory Database: [GHSA-qhr6-mgqr-mchm](https://github.com/advisories/GHSA-qhr6-mgqr-mchm), CC-BY-4.0, modified 2026-07-07
- NVD: [CVE-2025-47285](https://nvd.nist.gov/vuln/detail/CVE-2025-47285), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-2029](https://osv.dev/vulnerability/PYSEC-2026-2029), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2025-47285 · Whole record: https://cve.day/CVE-2025-47285.json · Rebuilt by cve.day 2026-11-25T22:58:58.091Z
