CVE-2025-26622: Vyper's sqrt doesn't define rounding behavior
2.3
CVSS Score
4.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.17917%
CWE
Published
2/21/2025
Updated
2/24/2025
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
vyper | pip | <= 0.4.0 | 0.4.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability explicitly affects Vyper's sqrt() builtin for decimals. The provided code snippet shows the vulnerable loop structure handling the calculation. The fix in PR #4486 modifies this specific sqrt implementation to enforce rounding down, and the test case added in tests/functional/codegen/types/numbers/test_sqrt.py directly targets this decimal sqrt behavior. Though the exact file path isn't explicitly stated, Vyper's architecture places built-in function implementations in files like vyper/builtin_functions/functions.py.