What’s Vulnerable › Vulnerabilities
CVE-2025-26622: sqrt doesn't define rounding behavior in Vyper
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.3% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2025-02-21 · updated 2026-06-17
- Weakness: CWE-682
Description
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.
Affected products
- vyperlang vyper: before 0.4.1 — fixed in 0.4.1
How to fix
Upgrade to a fixed version: vyperlang vyper 0.4.1. Check the vendor advisory for mitigations.
References
- https://github.com/vyperlang/vyper/pull/4486
- https://github.com/vyperlang/vyper/security/advisories/GHSA-2p94-8669-xg86
Get alerted when CVE-2025-26622 or the next vulnerability affects your stack