CVE-2026-16659
Pre-authentication NULL pointer dereference in MCUboot serial-recovery image upload (encrypted-image builds)
Mitigation
- Upgrade mcuboot to 2.5.0 or later.
Who should check
- Anyone running mcu-tools mcuboot >= 2.0.0, < 2.5.0
Vulnerability facts
- Affected
- mcu-tools mcuboot >= 2.0.0, < 2.5.0
- Fixed in
- mcu-tools mcuboot 2.5.0
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 4.0 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/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: None
- Availability impact: Low
- EPSS
- 0.12% chance of exploitation in 30 days (percentile 1, 2026-11-28)
- CWE
- CWE-476
- Modified
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| mcu-tools mcuboot | >= 2.0.0, < 2.5.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-16659. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-16659.md Affected: mcu-tools mcuboot >= 2.0.0, < 2.5.0 Fixed in: mcu-tools mcuboot 2.5.0 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-16659 being exploited?
There is no confirmed exploitation: CVE-2026-16659 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.12% chance of exploitation in the next 30 days (as of 2026-11-28).
How serious is CVE-2026-16659?
Medium: CVSS 4.0 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2026-16659?
mcu-tools mcuboot >= 2.0.0, < 2.5.0.
Is there a fix for CVE-2026-16659?
Yes. Fixed in mcu-tools mcuboot 2.5.0. Upgrade mcuboot to 2.5.0 or later.
How do I check if I'm affected by CVE-2026-16659?
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.
More mcu-tools vulnerabilities
See all| Severity | Identifier / vulnerability | Technology | Signals | Age |
|---|---|---|---|---|
| MEDIUM 4.0 | CVE-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.0 | CVE-2026-16669 Espressif flash-encryption provisioning leaves eFuse key material and plaintext sector buffers on the bootloader stack | mcu-tools | EPSS 2% | |
| MEDIUM 6.2 | CVE-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.7 | CVE-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.4 | CVE-2026-16668 Unbounded CBOR recursion in MCUboot serial recovery allows pre-authentication stack exhaustion | mcu-tools | EPSS 44% |