Description
A vulnerability was found in MicroPython 1.23.0. It has been rated as critical. Affected by this issue is the function mpz_as_bytes of the file py/objint.c. The manipulation leads to heap-based buffer overflow. The attack may be launched remotely. The exploit has been disclosed to the public and may be used. The patch is identified as 908ab1ceca15ee6fd0ef82ca4cba770a3ec41894. It is recommended to apply a patch to fix this issue. In micropython objint component, converting zero from int to bytes leads to heap buffer-overflow-write at mpz_as_bytes.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| — | MicroPython | 1.23.0 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | micropython | 1.24.0+ds-1 | — |
| Debian 13 | micropython | 1.24.0+ds-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 24.04 LTS | micropython | No fix yet | — |
| Ubuntu 22.04 LTS | micropython | No fix yet | — |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 20.04 LTS | micropython | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | micropython-copy | <= 3.3.3.post3 | — | GHSA-vh3x-525m-jp4r |
| PyPI | micropython-copy | all versions | — | PYSEC-2024-87 |
| PyPI | micropython-io | <= 0.1 | — | GHSA-vh3x-525m-jp4r |
| PyPI | micropython-io | all versions | — | PYSEC-2024-88 |
| PyPI | micropython-os | <= 0.8 | — | GHSA-vh3x-525m-jp4r |
| PyPI | micropython-os | all versions | — | PYSEC-2024-89 |
References
- VDB-277766 | MicroPython objint.c mpz_as_bytes heap-based overflow vdb-entry technical-description
- VDB-277766 | CTI Indicators (IOB, IOC, IOA) signature permissions-required
- Submit #409317 | micropython v1.23.0 Buffer Overflow third-party-advisory
- https://github.com/micropython/micropython/issues/13041 exploit issue-tracking
- https://github.com/micropython/micropython/commit/908ab1ceca15ee6fd0ef82ca4cba770a3ec41894 patch