Out-of-bounds Write Affecting vyper package, versions [,0.3.10rc4)
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-5905487
- published 19 Sep 2023
- disclosed 18 Sep 2023
- credit trocher
Introduced: 18 Sep 2023
CVE-2023-42443 Open this link in a new tabHow to fix?
Upgrade vyper
to version 0.3.10rc4 or higher.
Overview
vyper is a Pythonic Smart Contract Language for the EVM.
Affected versions of this package are vulnerable to Out-of-bounds Write via the builtins raw_call
, create_from_blueprint
and create_copy_of
. An attacker can corrupt the memory used, leading to incorrect calldata
in the sub-context or deploying incorrect bytecode by passing complex expressions that result in writing to the memory.
Note: This is only exploitable if:
the
data
argument of theraw_call
builtin ismsg.data
and thevalue
orgas
passed to the builtin is a complex expression that results in writing to the memory.For
create_copy_of
andcreate_from_blueprint
, thevalue
orsalt
passed to the builtin must be a complex expression that results in writing to the memory. Forcreate_from_blueprint
, either no constructor parameters should be passed to the builtin orraw_args
should be set to True.
Workaround:
This vulnerability can be mitigated by caching the complex expressions that are being passed as kwargs to the builtin in memory prior to the call to the builtin.