Cloudanix VulnDB

CVE-2023-7158

Critical · 9.8

CVSS

9.8

EPSS

1.2%

Published

Dec 29, 2023

CISA due date

—

Cloudanix analysis

Act now SSVC: Track

A bug in MicroPython lets attackers who can reach a device take full control of it by sending specially crafted data over the network.

Exploit Available
Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Remote Code Execution
Component
Library
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Heap-based buffer overflow in the slice_indices function of objslice.c triggered by manipulated slice parameters, enabling remote arbitrary code execution or denial of service.

Why it matters to the business

Remote compromise of embedded and IoT devices running MicroPython, potentially resulting in full device takeover, data exposure, or operational disruption; low immediate risk given stable low EPSS and public exploit availability since late 2023.

How an attack unfolds

An attacker identifies a remotely reachable MicroPython instance and sends crafted slice index values that overflow the heap buffer in objslice.c, achieving code execution without authentication.

How to fix it

Upgrade to MicroPython 1.22.0 or apply the fix in commit 9feb0689eeaca5ce88aedcc680f997a3b4d0221c; rebuild and redeploy affected firmware or applications.

How to confirm the fix worked

Confirm running version is 1.22.0 or later containing commit 9feb0689eeaca5ce88aedcc680f997a3b4d0221c; perform regression testing on slice operations and monitor for buffer-related crashes.

Typical attack path

  1. Locate exposed MicroPython services or devices
  2. Craft malicious slice operation parameters
  3. Transmit payload over the network to trigger slice_indices
  4. Exploit resulting heap corruption for code execution or crash

How to detect it

Review application logs and crash dumps for faults originating in objslice.c; correlate with unusual network traffic to MicroPython endpoints and monitor for heap exhaustion indicators.

What your security team should do

  • Prioritize upgrade of all MicroPython deployments to the fixed version
  • Inventory devices and applications using the affected component
  • Implement network segmentation for embedded systems pending patches
  • Monitor public exploit repositories for active proof-of-concept usage

The record

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.

Affected packages

Ecosystem Package Introduced Fixed
Ubuntu:18.04:LTS giac 0 No fix
Ubuntu:20.04:LTS giac 0 No fix
Ubuntu:22.04:LTS giac 0 No fix
Ubuntu:24.04:LTS giac 0 No fix
Ubuntu:24.10 giac 0 No fix
Ubuntu:25.04 giac 0 No fix
Ubuntu:25.10 giac 0 No fix
Ubuntu:Pro:18.04:LTS giac 0 No fix
Ubuntu:Pro:20.04:LTS giac 0 No fix
openSUSE:Tumbleweed micropython 0 1.22.0-1.1

Related vulnerabilities