Read the docs

Out-of-bounds read in MCUboot serial recovery image index

Priority LOW 22CWE-129Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
—
Confidentiality · integrity · availability
None · Low · Low
Fix status
No fix listed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA.

Summary

MCUboot from 2.0.0 onward accepts an unchecked image index in its Zephyr serial recovery upload handler, so an out-of-range value reads past a slot table (CWE-129). An unauthenticated attacker with access to the serial recovery console can supply this value before any image signature is verified. The bad read can crash the bootloader during recovery and, for some values, lead to writes to a partition outside the image set.

Written with Claude Haiku 5.5 from the sources below · 2026-11-16

Description from the CNA

MCUboot's Zephyr serial-recovery upload handler bs_upload() in boot/boot_serial/src/boot_serial.c decodes the host-supplied image field of an MCUmgr image-upload request into img_num (a full 32-bit value) and latches it on the off == 0 packet without any range check. It then passes img_num straight to flash_area_id_from_multi_image_slot(img_num, 0), which on the Zephyr port resolves to __flash_area_ids_for_slot() in boot/zephyr/include/sysflash/sysflash.h and indexes the static const int all_slots[] table as all_slots[img_num 2]. That table holds only MCUBOOT_IMAGE_NUMBER 2 entries, so any img_num >= MCUBOOT_IMAGE_NUMBER is an out-of-bounds read. The path is reachable by anyone with access to the serial / SMP recovery console, which is unauthenticated by design, and the bad value is supplied before any image signature is verified. The defect is specific to the default non-direct upload path (MCUBOOT_SERIAL_DIRECT_IMAGE_UPLOAD disabled) on the Zephyr port with the array-backed slot layout (not CONFIG_SINGLE_APPLICATION_SLOT). It is not gated on a multi-image configuration: MCUBOOT_IMAGE_NUMBER defaults to 1, so even a default single-image build is affected for any image >= 1. The MCUBOOT_SERIAL_DIRECT_IMAGE_UPLOAD path is safe (its flash_area_id_from_direct_image() switch returns -EINVAL for unknown indices). flash_area_id_from_multi_image_slot() takes a signed int image_index while img_num is uint32_t, so the attacker controls the sign of the index as well as its magnitude: an image of 0xFFFFFFFE converts to -2 and reads all_slots[-4], off the front of the table, while large positive values read off the end (CWE-192). (0xFFFFFFFF itself is the "no image given" sentinel and selects image 0.) Either way the index multiply img * 2 is performed in int, so a wild offset yields a bus/hard fault, giving a reliable denial of service of the bootloader during recovery. For moderately out-of-range indices the read returns adjacent .rodata as a garbage flash-area id that is handed to flash_area_open(); this normally fails with MGMT_ERR_EINVAL, but if the garbage id happens to match a valid non-image partition, the subsequent erase/write can target a partition outside the image set (CWE-787). The attacker-supplied value is never echoed back, so there is no information disclosure. The fix is to reject img_num >= BOOT_IMAGE_NUMBER on the off == 0 packet, before the slot lookup. The comparison must be made on the unsigned img_num: an equivalent guard applied after the conversion to int would not reject the negative case above. __flash_area_ids_for_slot() should bounds-check its own arguments as defence in depth. This vulnerability was reported independently twice: by NVIDIA Project Vanessa on 2026-06-22, and by Kai Phan (@kaimandalic) on 2026-07-19 as GHSA-8v33-88p6-jffj, which is closed as a duplicate of this advisory. Both original reports are reproduced in full below.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00125 2nd percentileScored 2026-11-16
Fix No fix listed No fixed version in the sources yet

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
mcu-toolsmcuboot2.0.0 and later—No fix listedCNA
  • mcuboot Vendormcu-tools Affected 2.0.0 and later Fixed in — No fix listed CNA

Remediation

The sources list no fixed version for mcuboot. The source description says the fix is to reject image indices at or above BOOT_IMAGE_NUMBER on the first upload packet, comparing the unsigned value before the slot lookup.

Written with Claude Haiku 5.5 from the sources below · 2026-11-16

Timeline

  1. 2026-11-13 Threatist record created from CVE-2026-16664
  2. 2026-11-13 Alias added: GHSA-4mp4-cg6q-qvjw
  3. 2026-11-13 2 new references · CNA
  4. 2026-11-16 CISA SSVC decision points changed

References

  • TI-2024-21755 MCUboot Injection attack of unprotected TLV values CVSS 3.1HIGH 7.7
  • TI-2026-91071 NULL pointer dereference in MCUboot serial recovery image upload CVSS 3.1MEDIUM 4.0
  • TI-2026-91078 Out-of-bounds read in MCUboot image hash during validation CVSS 3.1LOW 2.9
  • TI-2026-91074 MCUboot split-image out-of-bounds stack write with SHA-384/SHA-512 CVSS 3.1LOW 2.9
  • TI-2026-91072 Uninitialised stack memory leaks into MCUboot measured-boot record CVSS 3.1LOW 2.4
  • TI-2026-91077 MCUboot TLV iterator reads entries without bounds check against TLV area CVSS 3.1LOW 2.0
See all 8 →

Sources