Vyper's `concat()` builtin may elide side-effects for zero-length arguments
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- —
- Confidentiality · integrity · availability
- None · Low · None
- Fix status
- No fix listed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| vyperlang | vyper | up to 0.4.2rc1 | — | No fix listed | CNA |
| — | vyper (PyPI) | up to 0.4.2rc1 | — | No fix listed | GHSA-qhr6-mgqr-mchm |
- vyper Vendorvyperlang Affected up to 0.4.2rc1 Fixed in — No fix listed CNA
- vyper (PyPI) Vendor— Affected up to 0.4.2rc1 Fixed in — No fix listed GHSA-qhr6-mgqr-mchm
Remediation
No fixed version listed by the sources yet.
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2025-47285
- 2026-10-03 Alias added: GHSA-qhr6-mgqr-mchm
References
More vyperlang vulnerabilities
- TI-2024-16182 Vyper bounds check on built-in `slice()` function can be overflowed CVSS 3.1CRITICAL 9.8
- TI-2024-14992 concat built-in can corrupt memory in vyper CVSS 3.1CRITICAL 9.8
- TI-2024-16184 Vyper array negative index vulnerability CVSS 3.1CRITICAL 9.8
- TI-2022-08657 Integer bounds error in Vyper CVSS 3.1CRITICAL 9.8
- TI-2022-11796 Multiple evaluation of contract address in call in vyper CVSS 3.1HIGH 8.2
- TI-2026-78730 Optimizer miscompilation of msg.value | K in Vyper ternary branches CVSS 4.0HIGH 8.2
Sources
- CVE-2025-47285 · CVE Program
- CVE-2025-47285 · NVD
- FIRST EPSS
- GHSA-qhr6-mgqr-mchm · GitHub Advisory Database · CC BY 4.0
- CVE-2025-47285 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences