Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. vyper
  4. ›
  5. CVE-2025-26622

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

February 21, 2025 (updated April 9, 2025)

Vyper’s 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.

the fix is tracked in https://github.com/vyperlang/vyper/pull/4486

References

  • github.com/advisories/GHSA-2p94-8669-xg86
  • github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2025-29.yaml
  • github.com/vyperlang/vyper
  • github.com/vyperlang/vyper/pull/4486
  • github.com/vyperlang/vyper/security/advisories/GHSA-2p94-8669-xg86
  • nvd.nist.gov/vuln/detail/CVE-2025-26622

Code Behaviors & Features

Detect and mitigate CVE-2025-26622 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.4.1

Fixed versions

  • 0.4.1

Solution

Upgrade to version 0.4.1 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-682: Incorrect Calculation

Source file

pypi/vyper/CVE-2025-26622.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:43 +0000.