{"answers":{"affected":"3 open source packages ship an affected version, including vyper. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-24788 in the wild and no public exploit code.","fix":"Upgrade vyper to 0.3.2 or later.","what":"CVE-2022-24788 is a high-severity memory corruption vulnerability in vyperlang vyper, published on 13 Apr 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2022-24788 and fix it if it is affected.\n\nWhat it is: CVE-2022-24788 is a high-severity memory corruption vulnerability in vyperlang vyper, published on 13 Apr 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2022-24788 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- vyper (PyPI): affected all versions; fixed in 0.3.2\n- vyper (PyPI): affected all versions; fixed in 0.3.2\n- vyper (PyPI): affected all versions; fixed in 0.3.2\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-2022-24788/ (Markdown: https://insights.sbomify.com/CVE-2022-24788/index.md)","id":"CVE-2022-24788","markdown":"https://insights.sbomify.com/CVE-2022-24788/index.md","name":"CVE-2022-24788","record":{"aliases":["GHSA-4mrx-6fxm-8jpg","PYSEC-2022-197"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution","denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Vyper smart contract compiler","requires_auth":"none","summary":"A buffer overflow in the Vyper compiler allows attackers to cause crashes or execute arbitrary code via malicious JSON interface imports.","user_interaction":"required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"vyper","vendor":"vyperlang"}],"cvss":{"score":7.1,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-119","name":"Improper Restriction of Operations within the Bounds of a Memory Buffer"},{"id":"CWE-120","name":"Buffer Copy without Checking Size of Input"}],"description":"Vyper is a pythonic Smart Contract Language for the ethereum virtual machine. Versions of vyper prior to 0.3.2 suffer from a potential buffer overrun. Importing a function from a JSON interface which returns `bytes` generates bytecode which does not clamp bytes length, potentially resulting in a buffer overrun. Users are advised to upgrade. There are no known workarounds for this issue.","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":"Buffer overflow in Vyper","id":"CVE-2022-24788","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"memory_corruption","year":"2022"},"n_packages":3,"n_references":2,"next":{"headline":"Deserialization of untrusted data in C1 CMS.","id":"CVE-2022-24789"},"packages":[{"ecosystem":"PyPI","fixed":["0.3.2"],"introduced":["0"],"last_affected":[],"package":"vyper","purl":null,"source":"GHSA-4mrx-6fxm-8jpg"},{"ecosystem":"PyPI","fixed":["0.3.2"],"introduced":["0"],"last_affected":[],"package":"vyper","purl":"pkg:pypi/vyper","source":"GHSA-4mrx-6fxm-8jpg"},{"ecosystem":"PyPI","fixed":["0.3.2"],"introduced":["0"],"last_affected":[],"package":"vyper","purl":"pkg:pypi/vyper","source":"PYSEC-2022-197"}],"prev":{"headline":"Incorrect Comparison in Vyper","id":"CVE-2022-24787"},"products":["vyper"],"published":"2022-04-13","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":8.1,"headline":"Vyper vulnerable to memory corruption in certain builtins utilizing `msize`","id":"CVE-2023-42443","kev_date_added":null,"published":"2023-09-18"},{"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":"partial"},"state":"PUBLISHED","updated":"2025-04-23","vendors":["vyperlang"]},"summary":"A buffer overflow in the Vyper compiler allows attackers to cause crashes or execute arbitrary code via malicious JSON interface imports.","url":"https://insights.sbomify.com/CVE-2022-24788/"}