# CVE-2026-16659: Pre-authentication NULL pointer dereference in MCUboot serial-recovery image upload (encrypted-image builds)

- **Severity:** MEDIUM 4.0
- **CVSS:** 4.0 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.12% (percentile 1, 2026-11-28)
- **CWE:** CWE-476
- **Published:** 2026-11-13T00:23:03.881Z
- **Modified:** 2026-11-24T23:13:22.727Z

## Who should check

- Anyone running mcu-tools mcuboot \>= 2.0.0, \< 2.5.0

## 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

- mcu-tools mcuboot: \>= 2.0.0, \< 2.5.0 (cvelist)

## Mitigation

- Upgrade mcuboot to 2.5.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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.

## References

- vendor: <https://github.com/mcu-tools/mcuboot/security/advisories/GHSA-777r-3chm-p78c>
- patch: <https://github.com/mcu-tools/mcuboot/commit/400f9a7242641655948b08acac19932f56d9881f>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-16659>
- FIRST EPSS: EPSS scores by FIRST <https://www.first.org/epss/>

HTML: <https://flawdb.com/CVE-2026-16659> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-16659>
