Skip to content
FlawDB
Sign in

CVE-2026-16664

MEDIUM 5.1EPSS 4%

Unchecked serial-recovery image index causes out-of-bounds slot-table read in MCUboot Zephyr port

Mitigation

  • No fix listed yet: follow the vendor advisory.

Who should check

  • Anyone running mcu-tools mcuboot >= 2.0.0, <= *

Vulnerability facts

Affected
mcu-tools mcuboot >= 2.0.0, <= *
Fixed in
No fix listed yet
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Not remotely exploitable (local or adjacent access needed)
CVSS
5.1 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:LOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Local
  • Attack complexity: Low
  • Privileges required: None
  • User interaction: None
  • Scope: Unchanged
  • Confidentiality impact: None
  • Integrity impact: Low
  • Availability impact: Low
EPSS
0.18% chance of exploitation in 30 days (percentile 4, 2026-11-28)
CWE
CWE-129
Published
Modified

Description

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.

Affected and fixed versions

Package / productAffectedFixedSource
mcu-tools mcuboot>= 2.0.0, <= *—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2026-16664. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-16664.md
Affected: mcu-tools mcuboot >= 2.0.0, <= *
Fixed in: no fixed version listed yet

Steps:
1. Search this machine and project for mcu-tools mcuboot: 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.

References

FAQ

Is CVE-2026-16664 being exploited?

There is no confirmed exploitation: CVE-2026-16664 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.18% chance of exploitation in the next 30 days (as of 2026-11-28).

How serious is CVE-2026-16664?

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

Which versions are affected by CVE-2026-16664?

mcu-tools mcuboot >= 2.0.0, <= *.

Is there a fix for CVE-2026-16664?

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-2026-16664?

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.

See all
Vulnerabilities, newest first
SeverityIdentifier / vulnerabilityTechnologySignalsAge
MEDIUM 4.0CVE-2026-16670

Out-of-bounds read in the PSA ECDSA signature DER parser on a malformed signature TLV before verification

mcu-tools
EPSS 5%
LOW 2.0CVE-2026-16669

Espressif flash-encryption provisioning leaves eFuse key material and plaintext sector buffers on the bootloader stack

mcu-tools
EPSS 2%
MEDIUM 6.2CVE-2026-16667

Cypress/PSoC6 flash backend fails to bounds-check flash accesses, allowing pre-auth out-of-bounds reads

mcu-tools
EPSS 14%
MEDIUM 5.7CVE-2026-16666

MCUboot swap resume trusts a flash-resident swap_size, allowing pre-authentication out-of-bounds flash operations

mcu-tools
EPSS 6%
LOW 2.4CVE-2026-16668

Unbounded CBOR recursion in MCUboot serial recovery allows pre-authentication stack exhaustion

mcu-tools
EPSS 44%
Sponsors