# CVE-2023-7152: MicroPython modselect.c poll\_set\_add\_fd use after free

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, CNA) `CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L`
- **CVSS metrics:** Attack vector: Adjacent network; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: Low; Integrity impact: Low; Availability impact: Low
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 1.31% (percentile 71, 2026-11-26)
- **CWE:** CWE-416
- **Aliases:** PYSEC-2023-256, PYSEC-2023-257, PYSEC-2023-258, PYSEC-2023-259
- **Published:** 2023-12-29T04:31:04.054Z
- **Modified:** 2026-06-17T06:52:11.407Z

## Who should check

- Projects that depend on PyPI package micropython-copy (0.0.1, 0.0.2, 3.3.3-2, 3.3.3.post3)
- Projects that depend on PyPI package micropython-io (0.0.1, 0.0.2, 0.0.3, 0.1)
- Projects that depend on PyPI package micropython-os (0.2.3, 0.2.4, 0.3, 0.3.1, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.6, 0.7)
- Projects that depend on PyPI package micropython-select (0.0.1, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.1, 0.1.1, 0.1.2)
- Anyone running MicroPython 1.21.0; 1.22.0-preview

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

## Affected and fixed versions

- PyPI `micropython-copy`: affected 0.0.1, 0.0.2, 3.3.3-2, 3.3.3.post3; fixed no fix listed yet (osv)
- PyPI `micropython-io`: affected 0.0.1, 0.0.2, 0.0.3, 0.1; fixed no fix listed yet (osv)
- PyPI `micropython-os`: affected 0.2.3, 0.2.4, 0.3, 0.3.1, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.6, 0.7; fixed no fix listed yet (osv)
- PyPI `micropython-select`: affected 0.0.1, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.1, 0.1.1, 0.1.2; fixed no fix listed yet (osv)
- MicroPython: 1.21.0; 1.22.0-preview (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-7152. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-7152.md
Affected: micropython-copy 0.0.1, 0.0.2, 3.3.3-2, 3.3.3.post3; micropython-io 0.0.1, 0.0.2, 0.0.3, 0.1; micropython-os 0.2.3, 0.2.4, 0.3, 0.3.1, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.6, 0.7; micropython-select 0.0.1, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.1, 0.1.1, 0.1.2
Fixed in: no fixed version listed yet

Steps:
1. Search this machine and project for micropython-copy (PyPI), micropython-io (PyPI), micropython-os (PyPI), micropython-select (PyPI), MicroPython: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-7152 being exploited?

There is no confirmed exploitation: CVE-2023-7152 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 1.31% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-7152?

Medium: CVSS 5.5 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2023-7152?

micropython-copy 0.0.1, 0.0.2, 3.3.3-2, 3.3.3.post3; micropython-io 0.0.1, 0.0.2, 0.0.3, 0.1; micropython-os 0.2.3, 0.2.4, 0.3, 0.3.1, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.6, 0.7; micropython-select 0.0.1, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.1, 0.1.1, 0.1.2.

### Is there a fix for CVE-2023-7152?

No fixed version is listed in the sources yet. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2023-7152?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://vuldb.com/?ctiid.249158>
- patch: <https://github.com/jimmo/micropython/commit/8b24aa36ba978eafc6114b6798b47b7bfecdca26>
- exploit: <https://github.com/micropython/micropython/issues/12887>
- article: <https://vuldb.com/?id.249158>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TEK46QAJOXXDZOWOIE2YACUOCZFWOBCK/>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4E2HYWCZB5R4SHY4SZZZSFDMD64N4SOZ/>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/D3WWY5JY4RTJE25APB4REGDUDPATG6H7/>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-7152>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2023-256> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2023-257> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2023-258> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2023-259> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2023-7152> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-7152>
