Vulnerability · Published Jul 25, 2023 · Assigned by GitHub_M

CVE-2023-37902Vyper's ecrecover can return undefined data if signature does not verify

Medium 5.3

In plain English

A medium-severity security flaw 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 0.6% (higher than 48% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.3Medium
Exploit odds (30 days)0.6%top 52.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

Vyper is a Pythonic programming language that targets the Ethereum Virtual Machine (EVM). Prior to version 0.3.10, the ecrecover precompile does not fill the output buffer if the signature does not verify. However, the ecrecover builtin will still return whatever is at memory location 0. This means that the if the compiler has been convinced to write to the 0 memory location with specially crafted data (generally, this can happen with a hashmap access or immutable read) just before the ecrecover, a signature check might pass on an invalid signature. Version 0.3.10 contains a patch for this issue.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
PyPIvyper0.3.10GHSA-f5x6-7qgp-jhf3
PyPIvyper0.3.9PYSEC-2023-133

Affected products (as reported)

VendorProductVersions
vyperlang vyper < 0.3.10

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

References