Skip to content
DayZeroHub
High Not yet writtenCVSS 7.4CVE-2026-16665

CVE-2026-16665: MCUboot uses assert() as a security guard on the boot/swap/validation path; under NDEBUG (release builds) these checks are compiled out, so an inconsistent/attacker-influenced swa…

mcu-tools mcuboot

Preliminary notice: published right away from the original source data, without editorial write-up. It will shortly be replaced by a written and reviewed version.

Summary

CVE-2026-16665: high-severity vulnerability (CVSS 7.4) in mcu-tools mcuboot.

What happened

Original description from the source: Summary MCUboot enforces several security-critical invariants on the boot, image-swap, and validation paths using assert(). In a standard release/production build (NDEBUG defined) assert() expands to a no-op, so an invariant the code intends to halt on instead falls through, and execution continues with the bad or inconsistent state. Where the guarded condition is attacker-influenceable through the flash-write boundary (serial-recovery / DFU), this is a security check that is simply absent in release builds. This is one root cause (assert-as-security-guard, no-op under NDEBUG) with one fix approach (replace the security-critical asserts with real fail-closed checks), so it is filed as a single advisory covering the enumerated sites. Worst reachable instance — inconsistent swap status completes the swap without validation In the swap-resume status read, an inconsistent status (erased_sections > 1) is detected, logged, and — when MCUBOOT_VALIDATE_PRIMARY_SLOT is disabled — is meant to abort, because "there is no way to be sure the swapped primary slot is OK." The abort is assert(0): boot/bootutil/src/swap_move.c:181-194 — if (erased_sections > 1) { ... #if !defined(MCUBOOT_VALIDATE_PRIMARY_SLOT) / ... abort! / assert(0); #endif }, then execution falls through to compute bs->op/idx/state from the inconsistent status (lines 197-208) and return 0 (success). boot/bootutil/src/swap_offset.c:266-280 — identical pattern; falls through to bs->op/idx/state and return 0. boot/bootutil/src/swap_scratch.c:227-241 — same invalid/assert(0) pattern for the scratch backend. Under NDEBUG with primary-slot validation off, the inconsistent status is neither aborted (assert is a no-op) nor re…

Why it matters

High severity, CVSS 7.4.

Affected products and versions

mcu-tools mcuboot 1.1.0

ProductVersionsFixed in
mcu-tools mcuboot1.1.0—

Action recommended by the source

See the official references for the fix or mitigation.

Information taken from the source or the vendor. Verify it at the original link before acting.

Sources and references

Weaknesses (CWE): CWE-754

Relevant change history

  1. Published

    Preliminary advisory published.