{"id":"CVE-2022-29255","aliases":["CVE-2022-29255","GHSA-4v9q-cgpw-cf38","PYSEC-2022-43053"],"related":[],"kind":"vulnerability","state":"published","title":"Multiple evaluation of contract address in call in vyper","summary":"Vyper is a Pythonic Smart Contract Language for the ethereum virtual machine. In versions prior to 0.3.4 when a calling an external contract with no return value, the contract address (including side effects) could be evaluated twice. This may result in incorrect outcomes for contracts. This issue has been addressed in v0.3.4.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Vyper is a Pythonic Smart Contract Language for the ethereum virtual machine. In versions prior to 0.3.4 when a calling an external contract with no return value, the contract address (including side effects) could be evaluated twice. This may result in incorrect outcomes for contracts. This issue has been addressed in v0.3.4.","source":"cvelist"},{"lang":"en","text":"### Impact\nwhen a calling an external contract with no return value, the contract address could be evaluated twice. this is usually only an efficiency problem, but if evaluation of the contract address has side effects, it could result in double evaluation of the side effects.\n\nin the following example, `Foo(msg.sender).bar()` is the contract address for the following call (to `.foo()`), and could get evaluated twice\n\n```vyper\ninterface Foo:\n    def foo(): nonpayable\n    def bar() -> address: nonpayable\n\n@external\ndef do_stuff():\n    Foo(Foo(msg.sender).bar()).foo()\n```\n\n### Patches\n6b4d8ff185de071252feaa1c319712b2d6577f8d\n\n### Workarounds\nassign contract addresses to variables. the above example would change to\n```vyper\n@external\ndef do_stuff():\n    t: Foo = Foo(msg.sender).bar()\n    t.foo()\n```\n\n### References\n\n### For more information","format":"markdown","source":"ghsa"},{"lang":"es","text":"Vyper es un Lenguaje de Contratos Inteligentes de Python para la máquina virtual de Ethereum. En versiones anteriores a 0.3.4, cuando es llamado a un contrato externo sin valor de retorno, la dirección del contrato (incluyendo los efectos secundarios) podía ser evaluada dos veces. Esto podía resultar en  respuestas incorrectas para los contratos. Este problema ha sido abordado en versión 0.3.4","source":"nvd"}],"published":"2022-06-06T19:55:10.000Z","modified":"2026-06-17T04:39:55.853Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L","score":8.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L","score":8.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:N/I:P/A:N","score":5,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-670"],"affected":[{"ranges":[{"version":"< 0.3.4","status":"affected"}],"vendor":"vyperlang","product":"vyper","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.3.4"}],"ecosystem":"PyPI","package":"vyper","purl":"pkg:pypi/vyper","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.3.4"}],"vendor":"vyperlang","product":"vyper","cpe":"cpe:2.3:a:vyperlang:vyper:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"6b4d8ff185de071252feaa1c319712b2d6577f8d"},{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.3.4"}],"ecosystem":"PyPI","package":"vyper","purl":"pkg:pypi/vyper","repo":"https://github.com/vyperlang/vyper","source":"pysec"}],"references":[{"url":"https://github.com/vyperlang/vyper/security/advisories/GHSA-4v9q-cgpw-cf38","tags":["advisory","exploit","mitigation","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/vyperlang/vyper/commit/6b4d8ff185de071252feaa1c319712b2d6577f8d","tags":["fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-29255","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2022-43053.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/vyperlang/vyper","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2025-04-22T15:40:56.704Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-29255","url":"https://www.cve.org/CVERecord?id=CVE-2022-29255","licence":"CVE Terms of Use","modified":"2025-04-22T17:54:47.403Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4v9q-cgpw-cf38","url":"https://github.com/advisories/GHSA-4v9q-cgpw-cf38","licence":"CC-BY-4.0","modified":"2024-11-19T16:22:12.941Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-29255","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-29255","licence":"Public domain","modified":"2026-06-17T04:39:55.853Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2022-43053","url":"https://osv.dev/vulnerability/PYSEC-2022-43053","licence":"CC-BY-4.0","modified":"2023-11-08T04:09:12.537Z"}],"updatedAt":"2026-11-25T22:58:12.183Z","epss":{"score":0.01349,"percentile":0.72282,"date":"2026-12-01T12:00:22.000Z"}}