CWE
670
Advisory Published
CVE Published
Updated

CVE-2023-41052: Vyper: incorrect order of evaluation of side effects for some builtins

First published: Mon Sep 04 2023(Updated: )

### Impact The order of evaluation of the arguments of the builtin functions `uint256_addmod`, `uint256_mulmod`, `ecadd` and `ecmul` does not follow source order. • For `uint256_addmod(a,b,c)` and `uint256_mulmod(a,b,c)`, the order is `c,a,b`. • For `ecadd(a,b)` and `ecmul(a,b)`, the order is `b,a`. Note that this behaviour is problematic when the evaluation of one of the arguments produces side effects that other arguments depend on. ### Patches https://github.com/vyperlang/vyper/pull/3583 ### Workarounds When using builtins from the list above, make sure that the arguments of the expression do not produce side effects or, if one does, that no other argument is dependent on those side effects. ### References _Are there any links users can visit to find out more?_

Credit: security-advisories@github.com security-advisories@github.com security-advisories@github.com

Affected SoftwareAffected VersionHow to fix
Vyperlang Vyper<=0.3.9
pip/vyper<=0.3.9
0.3.10rc1

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 CVE-2023-41052?

    CVE-2023-41052 is a vulnerability in the Vyper smart contract language where the order of evaluation of certain builtin functions does not follow source order.

  • What is the impact of CVE-2023-41052?

    The impact of CVE-2023-41052 is that the order of evaluation for certain builtin functions in Vyper is inconsistent, which can lead to unexpected behavior or vulnerabilities in smart contracts.

  • How can I fix CVE-2023-41052?

    To fix CVE-2023-41052, update to Vyper version 0.3.10 or later.

  • What is the severity of CVE-2023-41052?

    CVE-2023-41052 has a severity rating of 5.3, which is considered medium severity.

  • What is the CWE ID of CVE-2023-41052?

    The CWE ID of CVE-2023-41052 is 670.

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