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.

Severity (CVSS 3.1)7.3High
Exploit odds (30 days)1.0%top 37.5% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Debian:13micropython1.24.0+ds-1DEBIAN-CVE-2024-8948
Debian:14micropython1.24.0+ds-1DEBIAN-CVE-2024-8948
PyPImicropython-copyno fix listedPYSEC-2024-87
PyPImicropython-copyno fix listedGHSA-vh3x-525m-jp4r
PyPImicropython-iono fix listedGHSA-vh3x-525m-jp4r
PyPImicropython-iono fix listedPYSEC-2024-88
PyPImicropython-osno fix listedPYSEC-2024-89
PyPImicropython-osno fix listedGHSA-vh3x-525m-jp4r
Ubuntu:22.04:LTSmicropythonno fix listedUBUNTU-CVE-2024-8948
Ubuntu:24.04:LTSmicropythonno fix listedUBUNTU-CVE-2024-8948

Affected products (as reported)

VendorProductVersions
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