{"id":"CVE-2023-41052","aliases":["GHSA-4hg4-9mf5-wxxq","PYSEC-2023-168"],"url":"https://o3.security/vulnerability/CVE-2023-41052","summary":"Vyper: incorrect order of evaluation of side effects for some builtins","details":"### Impact\nThe order of evaluation of the arguments of the builtin functions `uint256_addmod`, `uint256_mulmod`, `ecadd` and `ecmul` does not follow source order.\n• For `uint256_addmod(a,b,c)` and `uint256_mulmod(a,b,c)`, the order is `c,a,b`.\n• For `ecadd(a,b)` and `ecmul(a,b)`, the order is `b,a`.\n\nNote that this behaviour is problematic when the evaluation of one of the arguments produces side effects that other arguments depend on. \n\n### Patches\nhttps://github.com/vyperlang/vyper/pull/3583\n\n### Workarounds\nWhen 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.","published":"2023-09-04T17:36:23.480Z","modified":"2026-08-12T03:51:13.126877368Z","cvss":{"score":3.7,"severity":"LOW","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N"},"epss":null,"cisaKev":null,"exploitsKnown":1,"affectedPackages":[{"ecosystem":"PyPI","name":"vyper","fixedVersion":"0.3.10"}],"fix":{"url":"https://github.com/vyperlang/vyper/pull/3583","label":"vyperlang/vyper#3583"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/41xxx/CVE-2023-41052.json"},{"type":"ADVISORY","url":"https://github.com/vyperlang/vyper/security/advisories/GHSA-4hg4-9mf5-wxxq"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-41052"},{"type":"FIX","url":"https://github.com/vyperlang/vyper/pull/3583"},{"type":"WEB","url":"https://github.com/vyperlang/vyper/commit/78fa8dd8f91ba0cb26277eeffb585c68c83e7daa"},{"type":"WEB","url":"https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2023-168.yaml"},{"type":"PACKAGE","url":"https://github.com/vyperlang/vyper"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:13.126877368Z"}}