CVE-2024-8948: micropython Heap-based Buffer Overflow
Vulnerability summary
CVE-2024-8948 is a high (CVSS 7.5) Heap-based Buffer Overflow vulnerability in micropython. EPSS estimates a 0.99% chance of exploitation in the next 30 days, higher than 62% of scored vulnerabilities. 1 public exploit is recorded.
Timeline
- 17-09-2024PublishedVulnerability first disclosed.
- 17-09-2024Last modifiedVulnerability information updated.
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.
CVSS metrics
11 scores · 5 sources · 4 versions- OSV · UbuntuEcosystem advisory · calculated6.9MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
- NVDNIST6.9MediumCVSS: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
- OSV · PypiEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HDiffers
- OSV · UbuntuEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HDiffers
- OSV · DebianEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HDiffers
- NVDNIST7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HDiffers
- NVDNIST7.5HighAV:N/AC:L/Au:N/C:P/I:P/A:P
EPSS trend
Probability
0.99%
Chance of exploitation in the next 30 days
Percentile
62%
Versus all other CVEs
30-day change
0.00 pp
From 0.99% on 20-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
1 foundMicropython
Maturity: poc
Weaknesses
CWE · root cause- CWE-122Heap-based Buffer OverflowA heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().
- CWE-787Out-of-bounds WriteThe product writes data past the end, or before the beginning, of the intended buffer.
Affected systems
PyPI3 products
- micropython-copy≤ 3.3.3.post3 | < 908ab1ceca15ee6fd0ef82ca4cba770a3ec41894 | All versions (No fix recorded)
- micropython-io≤ 0.1 | < 908ab1ceca15ee6fd0ef82ca4cba770a3ec41894 | All versions (No fix recorded)
- micropython-os≤ 0.8 | < 908ab1ceca15ee6fd0ef82ca4cba770a3ec41894 | All versions (No fix recorded)
Debian1 product
- micropython< 1.24.0+ds-1
Micropython1 product
- micropython1.23.0
Ubuntu1 product
- micropythonAll versions (No fix recorded)
4 vendors · 6 products
References
13 links- github.com/micropython/micropython/issues/13041ExploitIssue TrackingWEBREPORTEVIDENCEThird Party Advisory