# CVE-2024-8948: MicroPython objint.c mpz_as_bytes heap-based overflow

- Severity: Medium 6.9 (CVSS:4.0, scored by VulDB) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.98%, higher than 63% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-09-17T18:50:17.599Z
- Modified: 2026-06-17T08:23:36.783Z
- Also known as: GHSA-vh3x-525m-jp4r, PYSEC-2024-87, PYSEC-2024-88, PYSEC-2024-89
- Weaknesses: CWE-122, CWE-787
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: VulDB

## 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.

(As written by CVE List.)

## Affected

- MicroPython: 1.23.0
- micropython micropython: 1.23.0
- micropython-copy (PyPI): up to 3.3.3.post3; before 908ab1ceca15ee6fd0ef82ca4cba770a3ec41894; all versions
- micropython-io (PyPI): up to 0.1; before 908ab1ceca15ee6fd0ef82ca4cba770a3ec41894; all versions
- micropython-os (PyPI): up to 0.8; before 908ab1ceca15ee6fd0ef82ca4cba770a3ec41894; all versions

## Every score

- VulDB: CVSS:4.0 6.9 Medium `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`
- VulDB: CVSS:3.1 7.3 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`
- VulDB: CVSS:3.0 7.3 High `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`
- VulDB: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`
- GitHub: CVSS:3.1 7.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`
- GitHub: CVSS:4.0 Medium `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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- PyPA Advisory Database: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/micropython/micropython/issues/13041> (exploit, evidence, issue-tracking, report, third-party-advisory, web)
- <https://vuldb.com/?id.277766> (technical-description, third-party-advisory, vdb-entry, web)
- <https://vuldb.com/?ctiid.277766> (permissions-required, signature, web)
- <https://vuldb.com/?submit.409317> (third-party-advisory, web)
- <https://github.com/micropython/micropython/commit/908ab1ceca15ee6fd0ef82ca4cba770a3ec41894> (fix, patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-8948> (advisory)
- <https://github.com/pypa/advisory-database/tree/main/vulns/micropython-copy/PYSEC-2024-87.yaml> (web)
- <https://github.com/pypa/advisory-database/tree/main/vulns/micropython-io/PYSEC-2024-88.yaml> (web)
- <https://github.com/pypa/advisory-database/tree/main/vulns/micropython-os/PYSEC-2024-89.yaml> (web)
- <https://github.com/advisories/GHSA-vh3x-525m-jp4r> (advisory)

## Sources

- CVE List: [CVE-2024-8948](https://www.cve.org/CVERecord?id=CVE-2024-8948), CVE Terms of Use, modified 2024-09-17
- GitHub Advisory Database: [GHSA-vh3x-525m-jp4r](https://github.com/advisories/GHSA-vh3x-525m-jp4r), CC-BY-4.0, modified 2024-09-24
- NVD: [CVE-2024-8948](https://nvd.nist.gov/vuln/detail/CVE-2024-8948), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2024-87](https://osv.dev/vulnerability/PYSEC-2024-87), CC-BY-4.0, modified 2024-09-24
- PyPA Advisory Database: [PYSEC-2024-88](https://osv.dev/vulnerability/PYSEC-2024-88), CC-BY-4.0, modified 2024-09-24
- PyPA Advisory Database: [PYSEC-2024-89](https://osv.dev/vulnerability/PYSEC-2024-89), CC-BY-4.0, modified 2026-06-10

---

Page: https://cve.day/CVE-2024-8948 · Whole record: https://cve.day/CVE-2024-8948.json · Rebuilt by cve.day 2026-11-25T22:58:45.515Z
