<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>Most recent entries from all</title>
    <link>https://cve.radiocsirt.org</link>
    <description>Contains only the most 10 recent entries.</description>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>python-feedgen</generator>
    <language>en</language>
    <lastBuildDate>Fri, 02 Oct 2026 20:10:02 +0000</lastBuildDate>
    <item>
      <title>CVE-2024-32649 — vyper performs double eval of the argument of sqrt</title>
      <link>https://cve.radiocsirt.org/vuln/cve-2024-32649</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; vyperlang vyper&lt;/p&gt;
&lt;p&gt;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&amp;#39;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.&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; vyperlang vyper&lt;/p&gt;
&lt;p&gt;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&amp;#39;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.&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://cve.radiocsirt.org/vuln/cve-2024-32649</guid>
    </item>
    <item>
      <title>GHSA-5jrj-52x8-m64h — vyper performs multiple eval of `sqrt()` argument built in</title>
      <link>https://cve.radiocsirt.org/vuln/ghsa-5jrj-52x8-m64h</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; PyPI: vyper&lt;/p&gt;
&lt;p&gt;### Summary
Using the `sqrt` builtin can result in multiple eval evaluation of side effects when the argument has side-effects. The bug is more difficult (but not impossible!) to trigger as of 0.3.4, when the unique symbol fence was introduced (https://github.com/vyperlang/vyper/pull/2914).&lt;/p&gt;
&lt;p&gt;A contract search was performed and no vulnerable contracts were found in production.&lt;/p&gt;
&lt;p&gt;### Details
It can be seen that the `build_IR` function of the `sqrt` builtin doesn&amp;#39;t cache the argument to the stack: 
https://github.com/vyperlang/vyper/blob/4595938734d9988f8e46e8df38049ae0559abedb/vyper/builtins/functions.py#L2151&lt;/p&gt;
&lt;p&gt;As such, it can be evaluated multiple times (instead of retrieving the value from the stack).&lt;/p&gt;
&lt;p&gt;### PoC
With at least Vyper version `0.2.15+commit.6e7dba7` the following contract:
```vyper
c: uint256&lt;/p&gt;
&lt;p&gt;@internal
def some_decimal() -&amp;gt; decimal:
    self.c += 1
    return 1.0&lt;/p&gt;
&lt;p&gt;@external
def foo() -&amp;gt; uint256:
    k: decimal = sqrt(self.some_decimal())
    return self.c
```
passes the following test:
```solidity
// SPDX-License-Identifier: MIT
pragma solidity &amp;gt;=0.8.13;&lt;/p&gt;
&lt;p&gt;import &amp;#34;../../lib/ds-test/test.sol&amp;#34;;
import &amp;#34;../../lib/utils/Console.sol&amp;#34;;
import &amp;#34;../../lib/utils/VyperDeployer.sol&amp;#34;;&lt;/p&gt;
&lt;p&gt;import &amp;#34;../ITest.sol&amp;#34;;&lt;/p&gt;
&lt;p&gt;contract ConTest is DSTest {
    VyperDeployer vyperDeployer = new VyperDeployer();&lt;/p&gt;
&lt;p&gt;ITest t;&lt;/p&gt;
&lt;p&gt;function setUp() public {
        t = ITest(vyperDeployer.deployContract(&amp;#34;Test&amp;#34;));
    }&lt;/p&gt;
&lt;p&gt;function testFoo() public {
        uint256 val = t.foo();
        console…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; PyPI: vyper&lt;/p&gt;
&lt;p&gt;### Summary
Using the `sqrt` builtin can result in multiple eval evaluation of side effects when the argument has side-effects. The bug is more difficult (but not impossible!) to trigger as of 0.3.4, when the unique symbol fence was introduced (https://github.com/vyperlang/vyper/pull/2914).&lt;/p&gt;
&lt;p&gt;A contract search was performed and no vulnerable contracts were found in production.&lt;/p&gt;
&lt;p&gt;### Details
It can be seen that the `build_IR` function of the `sqrt` builtin doesn&amp;#39;t cache the argument to the stack: 
https://github.com/vyperlang/vyper/blob/4595938734d9988f8e46e8df38049ae0559abedb/vyper/builtins/functions.py#L2151&lt;/p&gt;
&lt;p&gt;As such, it can be evaluated multiple times (instead of retrieving the value from the stack).&lt;/p&gt;
&lt;p&gt;### PoC
With at least Vyper version `0.2.15+commit.6e7dba7` the following contract:
```vyper
c: uint256&lt;/p&gt;
&lt;p&gt;@internal
def some_decimal() -&amp;gt; decimal:
    self.c += 1
    return 1.0&lt;/p&gt;
&lt;p&gt;@external
def foo() -&amp;gt; uint256:
    k: decimal = sqrt(self.some_decimal())
    return self.c
```
passes the following test:
```solidity
// SPDX-License-Identifier: MIT
pragma solidity &amp;gt;=0.8.13;&lt;/p&gt;
&lt;p&gt;import &amp;#34;../../lib/ds-test/test.sol&amp;#34;;
import &amp;#34;../../lib/utils/Console.sol&amp;#34;;
import &amp;#34;../../lib/utils/VyperDeployer.sol&amp;#34;;&lt;/p&gt;
&lt;p&gt;import &amp;#34;../ITest.sol&amp;#34;;&lt;/p&gt;
&lt;p&gt;contract ConTest is DSTest {
    VyperDeployer vyperDeployer = new VyperDeployer();&lt;/p&gt;
&lt;p&gt;ITest t;&lt;/p&gt;
&lt;p&gt;function setUp() public {
        t = ITest(vyperDeployer.deployContract(&amp;#34;Test&amp;#34;));
    }&lt;/p&gt;
&lt;p&gt;function testFoo() public {
        uint256 val = t.foo();
        console…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://cve.radiocsirt.org/vuln/ghsa-5jrj-52x8-m64h</guid>
    </item>
  </channel>
</rss>
