{"answers":{"affected":"9 open source packages ship an affected version, including micropython-copy, micropython-io and micropython-os. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-8948 exists.","fix":"Apply the vendor's patch.","what":"CVE-2024-8948 is a medium-severity memory corruption vulnerability in MicroPython, published on 17 Sep 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-8948 and fix it if it is affected.\n\nWhat it is: CVE-2024-8948 is a medium-severity memory corruption vulnerability in MicroPython, published on 17 Sep 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-8948 exists.\n\nAffected packages and fixed versions:\n- micropython-copy (PyPI): affected all versions; no fix listed\n- micropython-copy (PyPI): affected all versions up to 3.3.3.post3; no fix listed\n- micropython-copy (PyPI): affected all versions up to 3.3.3.post3; no fix listed\n- micropython-io (PyPI): affected all versions; no fix listed\n- micropython-io (PyPI): affected all versions up to 0.1; no fix listed\n- micropython-io (PyPI): affected all versions up to 0.1; no fix listed\n- micropython-os (PyPI): affected all versions; no fix listed\n- micropython-os (PyPI): affected all versions up to 0.8; no fix listed\n- micropython-os (PyPI): affected all versions up to 0.8; no fix listed\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-2024-8948/ (Markdown: https://insights.sbomify.com/CVE-2024-8948/index.md)","id":"CVE-2024-8948","markdown":"https://insights.sbomify.com/CVE-2024-8948/index.md","name":"CVE-2024-8948","record":{"aliases":["DEBIAN-CVE-2024-8948","GHSA-vh3x-525m-jp4r","PYSEC-2024-87","PYSEC-2024-88","PYSEC-2024-89","UBUNTU-CVE-2024-8948"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["code_execution","denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"MicroPython library","requires_auth":"none","summary":"A heap-based buffer overflow in MicroPython allows remote attackers to execute arbitrary code or cause denial of service via integer conversion.","user_interaction":"not_required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"VulDB","cpe":[{"product":"micropython","vendor":"micropython"}],"cvss":{"score":6.9,"severity":"medium","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-787","name":"Out-of-bounds Write"},{"id":"CWE-122","name":"Heap-based Buffer Overflow"}],"description":"A vulnerability was found in MicroPython 1.23.0. It has been rated as critical. Affected by this issue is the function mpz_as_bytes of the file py/objint.c. The manipulation leads to heap-based buffer overflow. The attack may be launched remotely. The exploit has been disclosed to the public and may be used. The patch is identified as 908ab1ceca15ee6fd0ef82ca4cba770a3ec41894. It is recommended to apply a patch to fix this issue. In micropython objint component, converting zero from int to bytes leads to heap buffer-overflow-write at mpz_as_bytes.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"MicroPython objint.c mpz_as_bytes heap-based overflow","id":"CVE-2024-8948","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"memory_corruption","year":"2024"},"n_packages":9,"n_references":5,"next":{"headline":"SourceCodester Online Eyewear Shop Cart Content Master.php improper ownership management","id":"CVE-2024-8949"},"packages":[{"ecosystem":"PyPI","fixed":[],"introduced":["0"],"last_affected":[],"package":"micropython-copy","purl":"pkg:pypi/micropython-copy","source":"PYSEC-2024-87"},{"ecosystem":"PyPI","fixed":[],"introduced":["0"],"last_affected":["3.3.3.post3"],"package":"micropython-copy","purl":null,"source":"GHSA-vh3x-525m-jp4r"},{"ecosystem":"PyPI","fixed":[],"introduced":["0"],"last_affected":["3.3.3.post3"],"package":"micropython-copy","purl":"pkg:pypi/micropython-copy","source":"GHSA-vh3x-525m-jp4r"},{"ecosystem":"PyPI","fixed":[],"introduced":["0"],"last_affected":[],"package":"micropython-io","purl":"pkg:pypi/micropython-io","source":"PYSEC-2024-88"},{"ecosystem":"PyPI","fixed":[],"introduced":["0"],"last_affected":["0.1"],"package":"micropython-io","purl":null,"source":"GHSA-vh3x-525m-jp4r"},{"ecosystem":"PyPI","fixed":[],"introduced":["0"],"last_affected":["0.1"],"package":"micropython-io","purl":"pkg:pypi/micropython-io","source":"GHSA-vh3x-525m-jp4r"},{"ecosystem":"PyPI","fixed":[],"introduced":["0"],"last_affected":[],"package":"micropython-os","purl":"pkg:pypi/micropython-os","source":"PYSEC-2024-89"},{"ecosystem":"PyPI","fixed":[],"introduced":["0"],"last_affected":["0.8"],"package":"micropython-os","purl":null,"source":"GHSA-vh3x-525m-jp4r"},{"ecosystem":"PyPI","fixed":[],"introduced":["0"],"last_affected":["0.8"],"package":"micropython-os","purl":"pkg:pypi/micropython-os","source":"GHSA-vh3x-525m-jp4r"}],"prev":{"headline":"MicroPython objarray.c use after free","id":"CVE-2024-8947"},"products":["MicroPython"],"published":"2024-09-17","related":[{"cvss_score":7.3,"headline":"MicroPython objslice.c slice_indices heap-based overflow","id":"CVE-2023-7158","kev_date_added":null,"published":"2023-12-29"},{"cvss_score":6.9,"headline":"MicroPython VFS Unmount vfs.c mp_vfs_umount heap-based overflow","id":"CVE-2024-8946","kev_date_added":null,"published":"2024-09-17"},{"cvss_score":6.3,"headline":"MicroPython objarray.c use after free","id":"CVE-2024-8947","kev_date_added":null,"published":"2024-09-17"},{"cvss_score":5.5,"headline":"MicroPython modselect.c poll_set_add_fd use after free","id":"CVE-2023-7152","kev_date_added":null,"published":"2023-12-29"},{"cvss_score":4.8,"headline":"micropython runtime.c mp_import_all memory corruption","id":"CVE-2026-1998","kev_date_added":null,"published":"2026-02-06"}],"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":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-09-17","vendors":["n/a"]},"summary":"A heap-based buffer overflow in MicroPython allows remote attackers to execute arbitrary code or cause denial of service via integer conversion.","url":"https://insights.sbomify.com/CVE-2024-8948/"}