Miggo Logo

CVE-2025-26622: Vyper's sqrt doesn't define rounding behavior

2.3

CVSS Score
4.0

Basic Information

EPSS Score
0.17917%
Published
2/21/2025
Updated
2/24/2025
KEV Status
No
Technology
TechnologyPython

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 NameEcosystemVulnerable VersionsFirst Patched Version
vyperpip<= 0.4.00.4.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot 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.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

Vyp*r's `sqrt()` *uiltin us*s t** ***yloni*n m*t*o* to **l*ul*t* squ*r* roots o* ***im*ls. Un*ortun*t*ly, improp*r **n*lin* o* t** os*ill*tin* *in*l st*t*s m*y l*** to sqrt in*orr**tly r*turnin* roun*** up r*sults. t** *ix is tr**k** in *ttps://*it*

Reasoning

T** vuln*r**ility *xpli*itly *****ts Vyp*r's sqrt() *uiltin *or ***im*ls. T** provi*** *o** snipp*t s*ows t** vuln*r**l* loop stru*tur* **n*lin* t** **l*ul*tion. T** *ix in PR #**** mo*i*i*s t*is sp**i*i* sqrt impl*m*nt*tion to *n*or** roun*in* *own,