PT-2025-21347 · Vyper · Vyper

Th3Anatomist

·

Published

2025-05-15

·

Updated

2025-05-16

·

CVE-2025-47285

CVSS v4.0

6.3

Medium

VectorAV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
Name of the Vulnerable Software and Affected Versions: Vyper versions up to and including 0.4.2rc1
Description: The issue arises from the concat() function potentially skipping the evaluation of side effects when the length of an argument is zero. This is due to a fastpath in the implementation that skips the evaluation of argument expressions when their length is zero. Typically, zero-length bytestrings are constructed with the empty literal b"", and it would be unusual for user code to construct zero-length bytestrings using expressions with side effects. However, such side effects could be introduced using the ternary operator, for example, b"" if self.do some side effect() else b"".
Recommendations: For versions up to and including 0.4.2rc1, as a temporary workaround, avoid having side effects in expressions that construct zero-length bytestrings. Update to version 0.4.2 or later, which is expected to include the fix available in pull request 4644.

Exploit

Fix

Weakness Enumeration

Related Identifiers

CVE-2025-47285
GHSA-QHR6-MGQR-MCHM

Affected Products

Vyper