7.5
CWE
682
EPSS
0.035%
Advisory Published
Advisory Published
Updated

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

First published: Fri Feb 21 2025(Updated: )

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.

Credit: security-advisories@github.com

Affected SoftwareAffected VersionHow to fix
Vyper<0.4.1
pip/vyper<=0.4.0
0.4.1
<0.4.1

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is the severity of CVE-2025-26622?

    CVE-2025-26622 is considered a moderate severity vulnerability due to the potential for incorrect calculations in smart contracts.

  • How do I fix CVE-2025-26622?

    To fix CVE-2025-26622, upgrade vyper to version 0.4.1 or later as it addresses the identified issue.

  • What software is affected by CVE-2025-26622?

    CVE-2025-26622 affects the vyper package versions up to and including 0.4.0.

  • What are the consequences of CVE-2025-26622?

    The consequence of CVE-2025-26622 is that the sqrt() function may return inaccurate rounded results, affecting the logic of smart contracts.

  • Is CVE-2025-26622 a remote or local vulnerability?

    CVE-2025-26622 is primarily a local vulnerability since it involves the execution of smart contracts on the Ethereum Virtual Machine.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203