// For flags

CVE-2023-40015

Vyper: reversed order of side effects for some operations

Severity Score

5.3
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

1
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

Track
*SSVC
Descriptions

Vyper is a Pythonic Smart Contract Language. For the following (probably non-exhaustive) list of expressions, the compiler evaluates the arguments from right to left instead of left to right. `unsafe_add, unsafe_sub, unsafe_mul, unsafe_div, pow_mod256, |, &, ^ (bitwise operators), bitwise_or (deprecated), bitwise_and (deprecated), bitwise_xor (deprecated), raw_call, <, >, <=, >=, ==, !=, in, not in (when lhs and rhs are enums)`. This behaviour becomes a problem when the evaluation of one of the arguments produces side effects that other arguments depend on. The following expressions can produce side-effect: state modifying external call , state modifying internal call, `raw_call`, `pop()` when used on a Dynamic Array stored in the storage, `create_minimal_proxy_to`, `create_copy_of`, `create_from_blueprint`. This issue has not yet been patched. Users are advised to make sure that the arguments of the expression do not produce side effects or, if one does, that no other argument is dependent on those side effects.

Vyper es un Lenguaje de Contratos Inteligentes de Python. Para la siguiente lista de expresiones (probablemente no exhaustiva), el compilador evalúa los argumentos de derecha a izquierda en lugar de izquierda a derecha. "unsafe_add, unsafe_sub, unsafe_mul, unsafe_div, pow_mod256, |, &amp;, ^ (bitwise operators), bitwise_or (deprecated), bitwise_and (deprecated), bitwise_xor (deprecated), raw_call, &lt;, &gt;, &lt;=, &gt;=, ==, !=, in, not in (cuando lhs y rhs son enums)". Este comportamiento se convierte en un problema cuando la evaluación de uno de los argumentos produce efectos secundarios de los que dependen otros argumentos. Las siguientes expresiones pueden producir efectos secundarios: llamada externa que modifica el estado, llamada interna que modifica el estado, "raw_call", "pop()" cuando se utiliza un array dinámico almacenado en el almacenamiento, "create_minimal_proxy_to", "create_copy_of" y "create_from_blueprint". Este problema aún no se ha solucionado. Se aconseja a los usuarios que se aseguren de que los argumentos de la expresión no producen efectos secundarios o, si alguno los produce, de que ningún otro argumento depende de esos efectos secundarios.

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:Track
Exploitation
None
Automatable
No
Tech. Impact
Partial
* Organization's Worst-case Scenario
Timeline
  • 2023-08-08 CVE Reserved
  • 2023-09-04 CVE Published
  • 2024-09-10 EPSS Updated
  • 2024-09-26 CVE Updated
  • 2024-09-26 First Exploit
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
CWE
  • CWE-670: Always-Incorrect Control Flow Implementation
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Vyperlang
Search vendor "Vyperlang"
Vyper
Search vendor "Vyperlang" for product "Vyper"
<= 0.3.9
Search vendor "Vyperlang" for product "Vyper" and version " <= 0.3.9"
python
Affected