Incorrect Calculation Affecting vyper package, versions [0,]


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-VYPER-8743938
  • published23 Feb 2025
  • disclosed21 Feb 2025
  • creditUnknown

Introduced: 21 Feb 2025

NewCVE-2025-26622  (opens in a new tab)
CWE-682  (opens in a new tab)

How to fix?

A fix was pushed into the master branch but not yet published.

Overview

vyper is a Pythonic Smart Contract Language for the EVM.

Affected versions of this package are vulnerable to Incorrect Calculation due to the sqrt function. An attacker can manipulate the output to cause incorrect rounding results by providing specific input values that cause the function to oscillate between two close values.

PoC

def test():
    d: decimal = 0.9999999998
    r: decimal = sqrt(d)    #this will be 0.9999999999

CVSS Scores

version 4.0
version 3.1