CVE-2023-7152
Python vulnerability analysis and mitigation

Overview

A critical use-after-free vulnerability (CVE-2023-7152) was discovered in MicroPython versions 1.21.0 and 1.22.0-preview. The vulnerability affects the poll_set_add_fd function in the file extmod/modselect.c. The issue was publicly disclosed and a patch has been identified with commit ID 8b24aa36ba978eafc6114b6798b47b7bfecdca26 (NVD).

Technical details

The vulnerability stems from improper memory management in the poll_set_add_fd function. When reallocating memory for poll_set->pollfds using m_renew, previously allocated file descriptors are freed but subsequently referenced, leading to a use-after-free condition. The vulnerability has received a CVSS v3.1 base score of 9.8 (CRITICAL) with vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (NVD, GitHub Issue).

Impact

The vulnerability can lead to unintended behavior of MicroPython and potential exploitation by attackers who could manipulate objects or file descriptors in ways that could compromise the system. The issue occurs when a file descriptor overlaps with a poll object's memory region, potentially allowing malicious actors to malform objects or file descriptors (GitHub Issue).

Mitigation and workarounds

The vulnerability has been patched in MicroPython version 1.22.2. Users are strongly advised to upgrade to this version. The fix involves proper handling of the pollfds allocation growth and updating existing poll_obj_t instances to maintain correct memory references (Fedora Update).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-22033HIGH8.6
  • PythonPython
  • label-studio
NoNoJan 12, 2026
CVE-2025-68472HIGH8.1
  • PythonPython
  • mindsdb
NoYesJan 12, 2026
CVE-2026-22251MEDIUM5.3
  • PythonPython
  • wlc
NoYesJan 12, 2026
CVE-2026-22691LOW2.7
  • PythonPython
  • pypdf
NoYesJan 10, 2026
CVE-2026-22250LOW2.5
  • PythonPython
  • wlc
NoYesJan 12, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management