# CVE-2023-7152: MicroPython modselect.c poll_set_add_fd use after free

- Severity: Medium 5.5 (CVSS:3.1, scored by VulDB) `CVSS:3.1/AV:A/AC:L/PR:L/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): 0.89%, higher than 60% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2023-12-29T04:31:04.054Z
- Modified: 2026-06-17T06:52:11.407Z
- Also known as: PYSEC-2023-256, PYSEC-2023-257, PYSEC-2023-258, PYSEC-2023-259
- Weaknesses: CWE-416
- Assigned by: VulDB

## Description

A vulnerability, which was classified as critical, has been found in MicroPython 1.21.0/1.22.0-preview. Affected by this issue is the function poll_set_add_fd of the file extmod/modselect.c. The manipulation leads to use after free. The exploit has been disclosed to the public and may be used. The patch is identified as 8b24aa36ba978eafc6114b6798b47b7bfecdca26. It is recommended to apply a patch to fix this issue. VDB-249158 is the identifier assigned to this vulnerability.

(As written by CVE List.)

## Affected

- MicroPython: 1.21.0; 1.22.0-preview
- micropython micropython: 1.21.0; 1.22.0
- micropython-copy (PyPI): before 8b24aa36ba978eafc6114b6798b47b7bfecdca26; all versions
- micropython-io (PyPI): before 8b24aa36ba978eafc6114b6798b47b7bfecdca26; all versions
- micropython-os (PyPI): before 8b24aa36ba978eafc6114b6798b47b7bfecdca26; all versions
- micropython-select (PyPI): before 8b24aa36ba978eafc6114b6798b47b7bfecdca26; all versions

## Every score

- VulDB: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L`
- VulDB: CVSS:3.0 5.5 Medium `CVSS:3.0/AV:A/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L`
- VulDB: CVSS:2.0 5.2 Medium `AV:A/AC:L/Au:S/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`
- PyPA Advisory Database: 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/12887> (exploit, issue-tracking, report)
- <https://vuldb.com/?id.249158> (advisory, technical-description, third-party-advisory, vdb-entry)
- <https://vuldb.com/?ctiid.249158> (advisory, permissions-required, signature, third-party-advisory, vdb-entry)
- <https://github.com/jimmo/micropython/commit/8b24aa36ba978eafc6114b6798b47b7bfecdca26> (fix, patch)
- <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-7152](https://www.cve.org/CVERecord?id=CVE-2023-7152), CVE Terms of Use, modified 2025-02-13
- NVD: [CVE-2023-7152](https://nvd.nist.gov/vuln/detail/CVE-2023-7152), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2023-256](https://osv.dev/vulnerability/PYSEC-2023-256), CC-BY-4.0, modified 2024-02-29
- PyPA Advisory Database: [PYSEC-2023-257](https://osv.dev/vulnerability/PYSEC-2023-257), CC-BY-4.0, modified 2024-02-29
- PyPA Advisory Database: [PYSEC-2023-258](https://osv.dev/vulnerability/PYSEC-2023-258), CC-BY-4.0, modified 2024-02-29
- PyPA Advisory Database: [PYSEC-2023-259](https://osv.dev/vulnerability/PYSEC-2023-259), CC-BY-4.0, modified 2024-02-29

---

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