CVE-2023-37902
published 2023-07-25CVE-2023-37902: 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…
PriorityP428medium5.3CVSS 3.1
AVNACLPRNUINSUCNILAN
EPSS
0.49%
38.6th percentile
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
5 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| vyperlang | vyper | < 0.3.10 | 0.3.10 |
| vyperlang | vyper | < 0.3.9 | 0.3.9 |
| vyperlang | vyper | >= 0 < 0.3.10 | 0.3.10 |
| vyperlang | vyper | >= 0 < 019a37ab98ff53f04fecfadf602b6cd5ac748f7f | 019a37ab98ff53f04fecfadf602b6cd5ac748f7f |
| vyperlang | vyper | >= 0 < 0.3.9 | 0.3.9 |
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
ecrecover can return undefined data if signature does not verify
ghsa·2023-07-25
CVE-2023-37902 [MEDIUM] CWE-252 ecrecover can return undefined data if signature does not verify
ecrecover can return undefined data if signature does not verify
### Impact
the ecrecover precompile does not fill the output buffer if the signature does not verify, see https://github.com/ethereum/go-ethereum/blob/b058cf454b3bdc7e770e2b3cec83a0bcb48f55ee/core/vm/contracts.go#L188. 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.
A contract search was performed. Most uses of `ecrecover` are used for erc2612-style permit implementations, which typically look like:
```vyper
assert _owner !=
OSV
ecrecover can return undefined data if signature does not verify
osv·2023-07-25
CVE-2023-37902 [MEDIUM] ecrecover can return undefined data if signature does not verify
ecrecover can return undefined data if signature does not verify
### Impact
the ecrecover precompile does not fill the output buffer if the signature does not verify, see https://github.com/ethereum/go-ethereum/blob/b058cf454b3bdc7e770e2b3cec83a0bcb48f55ee/core/vm/contracts.go#L188. 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.
A contract search was performed. Most uses of `ecrecover` are used for erc2612-style permit implementations, which typically look like:
```vyper
assert _owner !=
OSV
CVE-2023-37902: Vyper is a Pythonic programming language that targets the Ethereum Virtual Machine (EVM)
osv·2023-07-25
CVE-2023-37902 CVE-2023-37902: Vyper is a Pythonic programming language that targets the Ethereum Virtual Machine (EVM)
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.
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://github.com/vyperlang/vyper/commit/019a37ab98ff53f04fecfadf602b6cd5ac748f7fhttps://github.com/vyperlang/vyper/security/advisories/GHSA-f5x6-7qgp-jhf3https://github.com/vyperlang/vyper/commit/019a37ab98ff53f04fecfadf602b6cd5ac748f7fhttps://github.com/vyperlang/vyper/security/advisories/GHSA-f5x6-7qgp-jhf3
2023-07-25
Published