Vulnerability · Published May 11, 2023 · Assigned by GitHub_M

CVE-2023-31146Vyper vulnerable to OOB DynArray access when array is on both LHS and RHS of an assignment

High 7.5

In plain English

A high-severity out-of-bounds write in vyper from vyperlang. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.3% (higher than 70% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)1.3%top 30.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

Vyper is a Pythonic smart contract language for the Ethereum virtual machine. Prior to version 0.3.8, during codegen, the length word of a dynarray is written before the data, which can result in out-of-bounds array access in the case where the dynarray is on both the lhs and rhs of an assignment. The issue can cause data corruption across call frames. The expected behavior is to revert due to out-of-bounds array access. Version 0.3.8 contains a patch for this issue.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
PyPIvyper0.3.8GHSA-3p37-3636-q8wv
PyPIvyper0.3.8PYSEC-2023-77

Affected products (as reported)

VendorProductVersions
vyperlang vyper < 0.3.8

Weakness: CWE-787 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

References