First published: Fri Feb 21 2025(Updated: )
vyper is a Pythonic Smart Contract Language for the EVM. Vyper `sqrt()` builtin uses the babylonian method to calculate square roots of decimals. Unfortunately, improper handling of the oscillating final states may lead to sqrt incorrectly returning rounded up results. This issue is being addressed and a fix is expected in version 0.4.1. Users are advised to upgrade as soon as the patched release is available. There are no known workarounds for this vulnerability.
Credit: security-advisories@github.com
Affected Software | Affected Version | How to fix |
---|---|---|
Vyper | <0.4.1 | |
pip/vyper | <=0.4.0 | 0.4.1 |
<0.4.1 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
CVE-2025-26622 is considered a moderate severity vulnerability due to the potential for incorrect calculations in smart contracts.
To fix CVE-2025-26622, upgrade vyper to version 0.4.1 or later as it addresses the identified issue.
CVE-2025-26622 affects the vyper package versions up to and including 0.4.0.
The consequence of CVE-2025-26622 is that the sqrt() function may return inaccurate rounded results, affecting the logic of smart contracts.
CVE-2025-26622 is primarily a local vulnerability since it involves the execution of smart contracts on the Ethereum Virtual Machine.