CVE-2023-7158 MicroPython objslice.c slice_indices heap-based overflow

High 7.3 Published Updated

A heap-based buffer overflow in MicroPython allows remote attackers to execute arbitrary code or cause denial of service.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-7158?

CVE-2023-7158 is a high-severity memory corruption vulnerability in MicroPython, published on 29 Dec 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

A vulnerability was found in MicroPython up to 1.21.0. It has been classified as critical. Affected is the function slice_indices of the file objslice.c. The manipulation leads to heap-based buffer overflow. It is possible to launch the attack remotely. The exploit has been disclosed to the public and may be used. Upgrading to version 1.22.0 is able to address this issue. It is recommended to upgrade the affected component. The identifier of this vulnerability is VDB-249180.

Weakness: CWE-787, CWE-122

Which versions are affected by CVE-2023-7158?

It affects 1 product.

Linux distribution packages (1)
micropython openSUSE:TumbleweedAll versions1.22.0-1.1

Products include Micropython Micropython.

How do I fix CVE-2023-7158?

Upgrade to a fixed version.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2023-7158 being exploited?

There is no known exploitation of CVE-2023-7158 in the wild and no public exploit code.

Sources

Also known as GHSA-x33q-m927-7mq6, UBUNTU-CVE-2023-7158, openSUSE-SU-2024:13566-1.

Is CVE-2023-7158 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free