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

- Severity: High 7.3 (CVSS:3.1, scored by VulDB) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.23%, higher than 69% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2023-12-29T06:31:04.450Z
- Modified: 2026-06-17T06:52:12.303Z
- Weaknesses: CWE-122, CWE-787
- Assigned by: VulDB

## 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.

(As written by CVE List.)

## Affected

- MicroPython: 1.13.0; 1.14.0; 1.15.0; 1.16.0; 1.17.0; 1.18.0; 1.19.0; 1.20.0; 1.21.0
- micropython micropython: before 1.22.0

## Every score

- VulDB: CVSS:3.1 7.3 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`
- VulDB: CVSS:3.0 7.3 High `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`
- VulDB: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/micropython/micropython/issues/13007> (exploit, issue-tracking)
- <https://vuldb.com/?id.249180> (technical-description, third-party-advisory, vdb-entry)
- <https://vuldb.com/?ctiid.249180> (permissions-required, signature, third-party-advisory)
- <https://github.com/micropython/micropython/pull/13039> (issue-tracking)
- <https://github.com/micropython/micropython/pull/13039/commits/f397a3ec318f3ad05aa287764ae7cef32202380f> (issue-tracking, patch)
- <https://github.com/micropython/micropython/releases/tag/v1.22.0> (patch, release-notes)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TEK46QAJOXXDZOWOIE2YACUOCZFWOBCK/>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4E2HYWCZB5R4SHY4SZZZSFDMD64N4SOZ/>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/D3WWY5JY4RTJE25APB4REGDUDPATG6H7/>

## Sources

- CVE List: [CVE-2023-7158](https://www.cve.org/CVERecord?id=CVE-2023-7158), CVE Terms of Use, modified 2025-02-13
- NVD: [CVE-2023-7158](https://nvd.nist.gov/vuln/detail/CVE-2023-7158), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-7158 · Whole record: https://cve.day/CVE-2023-7158.json · Rebuilt by cve.day 2026-11-25T22:58:31.733Z
