{"id":"CVE-2024-32649","published":"2024-04-25T17:53:01Z","modified":"2024-08-02T02:13:40Z","title":"vyper performs double eval of the argument of sqrt","vendor":"vyperlang","product":"vyper","tier":"tail","description":{"text":"Vyper is a pythonic Smart Contract Language for the Ethereum virtual machine. In versions 0.3.10 and prior, using the `sqrt` builtin can result in double eval vulnerability when the argument has side-effects. It can be seen that the `build_IR` function of the `sqrt` builtin doesn't cache the argument to the stack. As such, it can be evaluated multiple times (instead of retrieving the value from the stack). No vulnerable production contracts were found. Additionally, double evaluation of side-effects should be easily discoverable in client tests. As such, the impact is low. As of time of publication, no fixed versions are available.\n","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00451,"percentile":0.40104,"provenance":"source"},"cwes":[{"id":"CWE-95","name":"Improper Neutralization of Directives in Dynamically Evaluated Code"}],"references":[{"url":"https://github.com/vyperlang/vyper/security/advisories/GHSA-5jrj-52x8-m64h","tags":["x_refsource_CONFIRM"]}],"priority":{"score":11.7,"factors":[{"name":"EPSS percentile","points":8.02},{"name":"CVSS severity","points":3.71}]},"vendorSlug":"vyperlang","affectedVersions":[{"vendor":"vyperlang","product":"vyper","versions":["<= 0.3.10"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2024-04-29T12:16:42.844342Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"vyper","vulnerableRanges":["<0.4.0"],"patched":["0.4.0"],"from":["GHSA-5jrj-52x8-m64h","PYSEC-2024-209"],"provenance":"source"}],"summary":{"text":"In Vyper versions 0.3.10 and prior, the sqrt builtin's build_IR function does not cache its argument on the stack, so the argument is evaluated more than once when it has side effects. An attacker who can get a contract to call sqrt with a side-effecting argument can cause those side effects to run repeatedly; no authentication or user interaction is described as required beyond the contract code path itself.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:55:47Z"},"euvd":{"id":"EUVD-2024-0185","exploited":false,"provenance":"source"}}