CVE-2025-27105CWE-787

AugAssign evaluation order causing OOB write within the object in Vyper

Low · published February 21, 2025

CVSS v4.0
2.3
EPSS
1%
Percentile
46.5
In the wild
Unconfirmed
What it is

💡 A crafty logic issue lies in how Vyper handles DynArray assignments, creating a low-key but sneaky vulnerability! Think of it like a chef who measures ingredients for a recipe but forgets to account for some new spices added later — they might bake a cake that’s a bit off! Similarly, Vyper's first evaluation of the target location can lead to unexpected results if the array changes during the operation. While this vulnerability is low in severity, it could still allow a crafty developer to manipulate the state of a contract unexpectedly, potentially leading to confusing or unintended behavior. That said, it's not a huge risk in practice, but hey, why leave room for surprises?

Put simply

Think of it like a chef who measures ingredients for a recipe but forgets to account for some new spices added later — they might bake a cake that’s a bit off! Similarly, Vyper's first evaluation of the target location can lead to unexpected results if the array changes during the operation. In Vyper, an AugAssign statement caches the target location, but if the target is a DynArray and the right-hand side modifies that array, the cached target gets evaluated first without rechecking bounds, leading to possible inconsistencies.

What to do

While this vulnerability is low in severity, it could still allow a crafty developer to manipulate the state of a contract unexpectedly, potentially leading to confusing or unintended behavior. That said, it's not a huge risk in practice, but hey, why leave room for surprises? Upgrade to version 0.4.1 of Vyper to patch this vulnerability immediately. Regularly review your smart contracts for similar logic flaws and ensure you're using the latest versions to maintain security. No known workarounds exist, so an upgrade is essential! You've got this! Stay vigilant and your smart contracts will be rock solid! 🛡️

The record
Technical detail
CVSS v4.0
2.3 · LOW
Vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
EPSS
0.00570 · 46.5th percentile
Weakness
CWE-787 · Out-of-bounds Write
Published
2025-02-21T21:27Z
EPSS history
Timeline
  • 21 FEB 21:27Z
    AugAssign evaluation order causing OOB write within the object in Vyper
    cvelistv5