First published: Fri Feb 21 2025(Updated: )
Vyper handles AugAssign statements by first caching the target location to avoid double evaluation. However, in the case when target is an access to a DynArray and the rhs modifies the array, the cached target will evaluate first, and the bounds check will not be re-evaluated during the write portion of the statement. In other words, the following code ```vyper def poc(): a: DynArray[uint256, 2] = [1, 2] a[1] += a.pop() ``` is equivalent to: ```vyper def poc(): a: DynArray[uint256, 2] = [1, 2] a[1] += a[len(a) - 1] a.pop() ``` rather than: ```vyper def poc(): a: DynArray[uint256, 2] = [1, 2] s: uint256 = a[1] t: uint256 = a.pop() a[1] = s + t # reverts due to oob access ```
Credit: security-advisories@github.com
Affected Software | Affected Version | How to fix |
---|---|---|
pip/vyper | <=0.4.0 | 0.4.1 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
CVE-2025-27105 is a vulnerability in Vyper that can lead to improper bounds checking of dynamic arrays, potentially resulting in exploitation.
To mitigate CVE-2025-27105, upgrade Vyper to version 0.4.1 or later.
CVE-2025-27105 affects Vyper versions up to and including 0.4.0.
Exploitation of CVE-2025-27105 may allow an attacker to bypass bounds checks, leading to undefined behavior or vulnerabilities.
Developers using Vyper should immediately update to version 0.4.1 to protect against CVE-2025-27105.