Read the docs

MCUboot release builds compile out its assert() security checks

Priority LOW 33CWE-754Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
None
Attack complexity
High
Impact type
—
Confidentiality · integrity · availability
High · High · High
Fix status
No fix listed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA.

Summary

MCUboot versions from 1.1.0 on use assert() for security checks on the boot, image swap and validation paths. In release builds defined with NDEBUG these asserts are compiled out, so execution continues with inconsistent state (CWE-754). A local attacker without privileges who can write flash through serial recovery or DFU can craft an inconsistent swap status, so the swap completes without validation and an image without a signature check may be booted.

Written with Claude Haiku 5.5 from the sources below · 2026-11-30

Description from the CNA

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-validated (validation off), so boot_complete_partial_swap() finishes the swap on inconsistent metadata and the primary slot is booted without a signature check. An attacker who can write the swap-status trailer can craft the inconsistent status. Reachability (threat model). Secondary slot + scratch trailers are A2-writable by definition (that is what a DFU upload is). Under MCUBOOT_SERIAL_RECOVERY the primary trailer is A2-writable too: boot/boot_serial/src/boot_serial.c:978 opens flash_area_id_from_multi_image_slot(img_num, 0) (== primary) and writes from offset 0 bounded by area_size, so it can paint the primary swap-status/magic. This is how the A2 (recovery/DFU, unauthenticated by design) attacker influences the guarded condition. Property violated: P1 (image authenticity / secure-boot bypass) when un-revalidated content is booted, and P6 (boot/recovery availability). Second reachable instance — resume-path swap_size from an unguarded trailer boot/bootutil/src/loader.c:1190-1193: the swap resume branch does fap = boot_find_status(...); assert(fap != NULL); rc = boot_read_swap_size(fap, &bs->swap_size); assert(rc == 0);. boot_find_status() (boot/bootutil/src/bootutil_misc.c:166-204) searches {scratch, primary} and, on no-valid-magic-match, returns the last-iterated area (primary), not NULL — so assert(fap != NULL) cannot fire even in debug, and under NDEBUG neither assert fires. swap_size is then read from an A2-writable (serial-recovery primary, or scratch) trailer with no fail-closed handling. This is the same swap-metadata-trust family as the recorded resume/swap_size disclosure. Reachable-security sites (center the fix here) 1. boot/bootutil/src/swap_move.c:193 — inconsistent-status assert(0), falls through to complete swap. A2 + !VALIDATE_PRIMARY. [worst] 2. boot/bootutil/src/swap_offset.c:278 — same, swap-offset backend. 3. boot/bootutil/src/swap_scratch.c:239 — same, swap-scratch backend. 4. boot/bootutil/src/loader.c:1191 and :1193 — resume assert(fap != NULL) / assert(rc == 0) guarding swap_size read from an A2-writable trailer; compounded by boot_find_status() never returning NULL. (Truncated. The full description is in the advisory: https://github.com/mcu-tools/mcuboot/security/advisories/GHSA-cr9j-p626-pwcc)

Why it matters now

EPSS 0.0056 40th percentileScored 2026-11-30
Fix No fix listed No fixed version in the sources yet

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
mcu-toolsmcuboot1.1.0 and later—No fix listedCNA
  • mcuboot Vendormcu-tools Affected 1.1.0 and later Fixed in — No fix listed CNA

Remediation

The sources list no fixed version for mcuboot. The advisory suggests replacing the security-critical asserts with checks that fail closed.

Written with Claude Haiku 5.5 from the sources below · 2026-11-30

Timeline

  1. 2026-11-24 Threatist record created from CVE-2026-16665
  2. 2026-11-25 Alias added: GHSA-xrmf-x2rw-f2xh

References

  • TI-2026-97829 Out-of-bounds stack write in MCUboot encrypted serial recovery CVSS 3.1HIGH 8.4
  • TI-2024-21755 MCUboot Injection attack of unprotected TLV values CVSS 3.1HIGH 7.7
  • TI-2026-97923 Out-of-bounds flash reads in MCUboot Cypress/PSoC6 backend CVSS 3.1MEDIUM 6.2
  • TI-2026-97922 Out-of-bounds flash access via forged swap status in MCUboot CVSS 3.1MEDIUM 5.7
  • TI-2026-91073 Out-of-bounds read in MCUboot serial recovery image index CVSS 3.1MEDIUM 5.1
  • TI-2026-97925 Out-of-bounds read in MCUboot ECDSA signature parsing CVSS 3.1MEDIUM 4.0
See all 15 →

Sources