Vulnerability · Published Sep 17, 2024 · Assigned by VulDB
CVE-2024-8948MicroPython objint.c mpz_as_bytes heap-based overflow
High 7.3
In plain English
A high-severity heap buffer overflow in MicroPython. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 1.0% (higher than 63% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:13 | micropython | 1.24.0+ds-1 | DEBIAN-CVE-2024-8948 |
| Debian:14 | micropython | 1.24.0+ds-1 | DEBIAN-CVE-2024-8948 |
| PyPI | micropython-copy | no fix listed | PYSEC-2024-87 |
| PyPI | micropython-copy | no fix listed | GHSA-vh3x-525m-jp4r |
| PyPI | micropython-io | no fix listed | GHSA-vh3x-525m-jp4r |
| PyPI | micropython-io | no fix listed | PYSEC-2024-88 |
| PyPI | micropython-os | no fix listed | PYSEC-2024-89 |
| PyPI | micropython-os | no fix listed | GHSA-vh3x-525m-jp4r |
| Ubuntu:22.04:LTS | micropython | no fix listed | UBUNTU-CVE-2024-8948 |
| Ubuntu:24.04:LTS | micropython | no fix listed | UBUNTU-CVE-2024-8948 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| n/a | MicroPython | 1.23.0 |
Weakness: CWE-122 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
References
- VDB-277766 | MicroPython objint.c mpz_as_bytes heap-based overflow vdb-entry, technical-description
- VDB-277766 | CTI Indicators (IOB, IOC, IOA) signature, permissions-required
- Submit #409317 | micropython v1.23.0 Buffer Overflow third-party-advisory
- https://github.com/micropython/micropython/issues/13041 exploit, issue-tracking
- https://github.com/micropython/micropython/commit/908ab1ceca15ee6fd0ef82ca4cba770a3ec41894 patch