NULL pointer dereference in MCUboot serial recovery image upload
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · Low
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA. Impact type from CWE-476.
Summary
MCUboot, the mcu-tools bootloader, from 2.0.0 before 2.5.0 dereferences a NULL flash area pointer in its serial-recovery image upload handler when encrypted image support is enabled. A malformed first upload command takes an early error path that skips opening the flash area, and the shared cleanup then reads from it (CWE-476). An unauthenticated attacker with access to the serial recovery console can crash the bootloader during recovery, which is a transient denial of service without memory corruption or authentication bypass. The Zephyr and Mynewt ports are affected, while the Espressif port is not.
Written with Claude Haiku 5.5 from the sources below · 2026-11-13
Description from the CNA
MCUboot's serial-recovery image-upload handler bs_upload() in boot/boot_serial/src/boot_serial.c declares const struct flash_area *fap = NULL and assigns it only via flash_area_open() part-way through the function. Two early validation failures (goto out_invalid_data) — a CBOR map that fails to decode, or an upload packet missing the off/data members — branch past the open while fap is still NULL, then fall into the shared epilogue. In MCUBOOT_ENC_IMAGES builds that epilogue unconditionally calls boot_handle_enc_fw(fap), which reaches boot_image_load_header() and flash_area_read() and dereferences the NULL flash_area. The defect is reachable pre-authentication: the trigger is the very first serial-recovery upload command carrying a malformed payload. The guarding conditions are default-true on a fresh recovery session — img_num, curr_off and img_size are zero-initialized statics, so curr_off == img_size and the primary-slot test both hold. It requires a non-default build: encrypted images (MCUBOOT_ENC_IMAGES / Zephyr CONFIG_BOOT_ENCRYPT_IMAGE) together with an active serial-recovery transport, on the Zephyr or Mynewt port (the two that build both boot/boot_serial/src/boot_serial.c and boot_serial_encryption.c with MCUBOOT_ENC_IMAGES). The impact is a transient denial of service of the bootloader during recovery. fap is a hard NULL rather than an attacker-controlled value, so there is no memory-corruption or information-leak primitive and image authentication is unaffected. Whether the dereference faults is platform-dependent — on targets where address 0x0 is mapped readable flash the read merely returns an error and execution continues, while targets that trap NULL (MPU / null-pointer-exception detection) take a hard fault. Because serial recovery is unauthenticated by design and already permits the console attacker to write the secondary slot, the added capability is only a low-value transient crash. The related unconditional flash_area_close(fap) call in the same epilogue is a safe no-op on the ports that reach it, so it does not contribute to the dereference. The affected ports are the Zephyr port — boot/zephyr/CMakeLists.txt compiles boot_serial.c under CONFIG_MCUBOOT_SERIAL and boot_serial_encryption.c under CONFIG_BOOT_ENCRYPT_IMAGE — and the Mynewt port, whose mcuboot_config.h defines MCUBOOT_SERIAL unconditionally and MCUBOOT_ENC_IMAGES under any BOOTUTIL_ENCRYPT_ syscfg, with boot/boot_serial/pkg.yml declaring no explicit source list so the whole directory is built. The Espressif port is not affected**: it compiles boot_serial.c but not boot_serial_encryption.c, and defines no MCUBOOT_ENC_IMAGES, so the #ifdef MCUBOOT_ENC_IMAGES block containing the call is preprocessed away. The NuttX, Cypress and Mbed ports do not build boot_serial.c at all.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
Remediation
Upgrade mcu-tools MCUboot to version 2.5.0 or later, which is the fixed version. The sources list no fixed version for the Zephyr or Mynewt builds beyond the MCUboot release.
Written with Claude Haiku 5.5 from the sources below · 2026-11-13
- Fix · CNA mcuboot (mcu-tools) Fixed in 2.5.0
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Release ·
mcu-tools mcuboot 2.5.0
7 records Highest priority Priority LOW 7 LOW
Other records, highest priority first
- TI-2026-91078 Out-of-bounds read in MCUboot image hash during validationPriority LOW 13
- TI-2026-91074 MCUboot split-image out-of-bounds stack write with SHA-384/SHA-512Priority LOW 13
- TI-2026-91072 Uninitialised stack memory leaks into MCUboot measured-boot recordPriority LOW 11
Timeline
- 2026-11-13 Threatist record created from CVE-2026-16659
- 2026-11-13 Alias added: GHSA-fwvg-qqfx-4m7g
References
Patch 1
Other 1
More mcu-tools vulnerabilities
- TI-2024-21755 MCUboot Injection attack of unprotected TLV values CVSS 3.1HIGH 7.7
- TI-2026-91073 Out-of-bounds read in MCUboot serial recovery image index CVSS 3.1MEDIUM 5.1
- 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
Sources
- CVE-2026-16659 · CVE Program
- CVE-2026-16659 · NVD
- FIRST EPSS
- GHSA-fwvg-qqfx-4m7g · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences