CVE-2026-16659
Received Received - Intake

NULL Pointer Dereference in MCUboot Serial Recovery

Vulnerability report for CVE-2026-16659, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-13

Last updated on: 2026-11-13

Assigner: Zephyr Project

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-13
Last Modified
2026-11-13
Generated
2026-11-13
AI Q&A
2026-11-13
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
mcu-tools mcuboot From 2.0.0 (inc) to 2.5.0 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-476 The product dereferences a pointer that it expects to be valid but is NULL.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This is a pre-authentication NULL pointer dereference vulnerability in MCUboot's serial-recovery image-upload handler. It occurs in the bs_upload() function where a flash_area pointer is initialized to NULL and only assigned later. If validation fails early, the function branches past the assignment, leading to a NULL dereference in encrypted-image builds during recovery.

Detection Guidance

To detect this vulnerability, check if your system uses MCUboot with encrypted images and serial-recovery enabled. Verify the Zephyr or Mynewt ports are active. Inspect boot_serial.c for the bs_upload() function and MCUBOOT_ENC_IMAGES build flag. Monitor for crashes during serial recovery uploads with malformed payloads.

Impact Analysis

The impact is a transient denial of service (DoS) during bootloader recovery. On platforms with NULL-pointer detection, it causes a hard fault. On others, it may return an error without lasting effects. No memory corruption or data leaks occur, and image authentication remains intact.

Compliance Impact

This vulnerability causes a transient denial of service during bootloader recovery, which may impact system availability. For GDPR, availability is a key principle, so prolonged disruptions could raise compliance concerns. For HIPAA, availability of critical systems is essential, and downtime may violate security requirements. However, the issue does not involve data breaches or unauthorized access, so confidentiality and integrity impacts are minimal.

Mitigation Strategies

Upgrade MCUboot to version 2.5.0 or later. Disable MCUBOOT_ENC_IMAGES if not required. Ensure serial-recovery is not exposed to untrusted networks. Validate all image uploads before decryption. Monitor for crashes during recovery processes.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-16659. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...