{"answers":{"affected":"3 open source packages ship an affected version, including vyper. It affects 1 product.","exploited":"There is no known exploitation of CVE-2023-42443 in the wild and no public exploit code.","fix":"Upgrade vyper to 0.3.10 or later.","what":"CVE-2023-42443 is a high-severity memory corruption vulnerability in vyperlang vyper, published on 18 Sep 2023. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-42443 and fix it if it is affected.\n\nWhat it is: CVE-2023-42443 is a high-severity memory corruption vulnerability in vyperlang vyper, published on 18 Sep 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2023-42443 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- vyper (PyPI): affected all versions; fixed in 0.3.10\n- vyper (PyPI): affected from 0.3.4; fixed in 0.3.10\n- vyper (PyPI): affected from 0.3.4; fixed in 0.3.10\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-42443/ (Markdown: https://insights.sbomify.com/CVE-2023-42443/index.md)","id":"CVE-2023-42443","markdown":"https://insights.sbomify.com/CVE-2023-42443/index.md","name":"CVE-2023-42443","record":{"aliases":["GHSA-c647-pxm2-c52w","PYSEC-2023-306"],"analysis":{"component_type":"developer_tool","fix_type":"no_fix_stated","impacts":["code_execution","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Vyper smart contract compiler","requires_auth":"none","summary":"Attackers can corrupt memory in Vyper smart contracts using specific builtins, potentially leading to incorrect bytecode deployment or call data manipulation.","user_interaction":"not_required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"vyper","vendor":"vyperlang"}],"cvss":{"score":8.1,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-787","name":"Out-of-bounds Write"}],"description":"Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine (EVM). In version 0.3.9 and prior, under certain conditions, the memory used by the builtins `raw_call`, `create_from_blueprint` and `create_copy_of` can be corrupted. For `raw_call`, the argument buffer of the call can be corrupted, leading to incorrect `calldata` in the sub-context. For `create_from_blueprint` and `create_copy_of`, the buffer for the to-be-deployed bytecode can be corrupted, leading to deploying incorrect bytecode.\n\nEach builtin has conditions that must be fulfilled for the corruption to happen. For `raw_call`, the `data` argument of the builtin must be `msg.data` and the `value` or `gas` passed to the builtin must be some complex expression that results in writing to the memory. For `create_copy_of`, the `value` or `salt` passed to the builtin must be some complex expression that results in writing to the memory. For `create_from_blueprint`, either no constructor parameters should be passed to the builtin or `raw_args` should be set to True, and the `value` or `salt` passed to the builtin must be some complex expression that results in writing to the memory.\n\nAs of time of publication, no patched version exists. The issue is still being investigated, and there might be other cases where the corruption might happen. When the builtin is being called from an `internal` function `F`, the issue is not present provided that the function calling `F` wrote to memory before calling `F`. As a workaround, the complex expressions that are being passed as kwargs to the builtin should be cached in memory prior to the call to the builtin.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Vyper vulnerable to memory corruption in certain builtins utilizing `msize`","id":"CVE-2023-42443","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"memory_corruption","year":"2023"},"n_packages":3,"n_references":2,"next":{"headline":"phonenumber panics on parsing crafted RF3966 inputs","id":"CVE-2023-42444"},"packages":[{"ecosystem":"PyPI","fixed":["0.3.10"],"introduced":["0"],"last_affected":[],"package":"vyper","purl":"pkg:pypi/vyper","source":"PYSEC-2023-306"},{"ecosystem":"PyPI","fixed":["0.3.10"],"introduced":["0.3.4"],"last_affected":[],"package":"vyper","purl":null,"source":"GHSA-c647-pxm2-c52w"},{"ecosystem":"PyPI","fixed":["0.3.10"],"introduced":["0.3.4"],"last_affected":[],"package":"vyper","purl":"pkg:pypi/vyper","source":"GHSA-c647-pxm2-c52w"}],"prev":{"headline":"JumpServer session replays download without authentication","id":"CVE-2023-42442"},"products":["vyper"],"published":"2023-09-18","related":[{"cvss_score":9.8,"headline":"Vyper array negative index vulnerability","id":"CVE-2024-24563","kev_date_added":null,"published":"2024-02-07"},{"cvss_score":9.8,"headline":"Vyper bounds check on built-in `slice()` function can be overflowed","id":"CVE-2024-24561","kev_date_added":null,"published":"2024-02-01"},{"cvss_score":9.1,"headline":"Vyper incorrectly allocated named re-entrancy locks","id":"CVE-2023-39363","kev_date_added":null,"published":"2023-08-07"},{"cvss_score":8.8,"headline":"Integer bounds error in Vyper","id":"CVE-2022-24845","kev_date_added":null,"published":"2022-04-13"},{"cvss_score":8.2,"headline":"Multiple evaluation of contract address in call in vyper","id":"CVE-2022-29255","kev_date_added":null,"published":"2022-06-06"},{"cvss_score":7.5,"headline":"Vyper has incorrect storage layout for contracts containing large arrays","id":"CVE-2023-46247","kev_date_added":null,"published":"2023-12-13"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-09-24","vendors":["vyperlang"]},"summary":"Attackers can corrupt memory in Vyper smart contracts using specific builtins, potentially leading to incorrect bytecode deployment or call data manipulation.","url":"https://insights.sbomify.com/CVE-2023-42443/"}