Always-Incorrect Control Flow Implementation Affecting vyper package, versions [,0.3.10rc1)
Threat Intelligence
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-PYTHON-VYPER-5880667
- published 5 Sep 2023
- disclosed 4 Sep 2023
- credit trocher
Introduced: 4 Sep 2023
CVE-2023-41052 Open this link in a new tabHow to fix?
Upgrade vyper
to version 0.3.10rc1 or higher.
Overview
vyper is a Pythonic Smart Contract Language for the EVM.
Affected versions of this package are vulnerable to Always-Incorrect Control Flow Implementation. The order of evaluation of the arguments of the builtin functions uint256_addmod
, uint256_mulmod
, ecadd
and ecmul
does not follow source order.
For
uint256_addmod(a,b,c)
anduint256_mulmod(a,b,c)
, the order isc,a,b
.For
ecadd(a,b)
andecmul(a,b)
, the order isb,a
.
Note:
This behaviour is problematic when the evaluation of one of the arguments produces side effects that other arguments depend on.
Mitigation:
When using builtins from the list above, users need 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.