What’s Vulnerable › Vulnerabilities
CVE-2023-37902: Vyper's ecrecover can return undefined data if signature does not verify
- Severity: medium (CVSS 5.3 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.6% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2023-07-25 · updated 2026-06-17
- Weakness: CWE-252
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 products
- vyperlang vyper: before 0.3.9 — fixed in 0.3.9
How to fix
Upgrade to a fixed version: vyperlang vyper 0.3.9. Check the vendor advisory for mitigations.
References
- https://github.com/vyperlang/vyper/commit/019a37ab98ff53f04fecfadf602b6cd5ac748f7f
- https://github.com/vyperlang/vyper/security/advisories/GHSA-f5x6-7qgp-jhf3
- https://github.com/vyperlang/vyper/commit/019a37ab98ff53f04fecfadf602b6cd5ac748f7f
- https://github.com/vyperlang/vyper/security/advisories/GHSA-f5x6-7qgp-jhf3
Get alerted when CVE-2023-37902 or the next vulnerability affects your stack