7.4
HIGH CVSS 3.1
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 swap status is not aborted and the swap completes on bad state
Description

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)

INFO

Published Date :

Nov. 24, 2026, 10:18 p.m.

Last Modified :

Nov. 24, 2026, 10:18 p.m.

Remotely Exploit :

No
Affected Products

The following products are affected by CVE-2026-16665 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Mcu-tools mcuboot
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 3.1 HIGH e2e69745-5e70-4e92-8431-deb5529a81ad
CVSS 3.1 HIGH MITRE-CVE
CVSS 3.1 HIGH [email protected]
Solution
Replace assert() with fail-closed checks for critical security invariants in release builds.
  • Replace security asserts with proper fail-closed checks.
  • Ensure invariants are enforced in release builds.
  • Update MCUboot to the latest secure version.
  • Review and test all security-related code paths.
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2026-16665.

URL Resource
https://github.com/mcu-tools/mcuboot/commit/133148bd5d792f781b72b8fce933ab9117780978
https://github.com/mcu-tools/mcuboot/commit/18c4f19e2e0e457b86bd37274a2fef4c3e6d2850
https://github.com/mcu-tools/mcuboot/commit/2d74b30860ac97f764367f3a66dc3b274a672244
https://github.com/mcu-tools/mcuboot/commit/36e56d691f4e853f2f741309751b9611689f4197
https://github.com/mcu-tools/mcuboot/commit/3b9159e1e04c6a09c691bdf9140bf303e3718c68
https://github.com/mcu-tools/mcuboot/commit/43dc9d0d97656f1c08b2ffef2f0a3c1db62cba7e
https://github.com/mcu-tools/mcuboot/commit/442c86b2131c119aab06ad4dde18ec62954d2808
https://github.com/mcu-tools/mcuboot/commit/4d9424a747de9c5e74be601aebee5239e371e21c
https://github.com/mcu-tools/mcuboot/commit/8e8ce11487c83975755b6ddcad69f4f42ee28977
https://github.com/mcu-tools/mcuboot/commit/9365411227c79a944ee72407e51a07320489e424
https://github.com/mcu-tools/mcuboot/commit/ab3fd3d4d563e57303fd0720bc0f0a93f5c619d0
https://github.com/mcu-tools/mcuboot/commit/adc0e42effb9422659c9d2d63399cdce1f297648
https://github.com/mcu-tools/mcuboot/commit/b0047116aa2a2cfb18f3f1bc2bd286217bc22e5c
https://github.com/mcu-tools/mcuboot/commit/e0872142b9d734c116b0ed7b35657dc933c3888b
https://github.com/mcu-tools/mcuboot/commit/e52ced626dd0391a0b7f175adf84b748b8db8795
https://github.com/mcu-tools/mcuboot/commit/ec006b882ce618e01e7bbddcb2e5e12cb6987e0a
https://github.com/mcu-tools/mcuboot/pull/3012
https://github.com/mcu-tools/mcuboot/security/advisories/GHSA-cr9j-p626-pwcc
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-16665 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2026-16665 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2026-16665 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2026-16665 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • New CVE Received by [email protected]

    Nov. 24, 2026

    Action Type Old Value New Value
    Added Description 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)
    Added CVSS V3.1 AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
    Added CWE CWE-754
    Added Affected New affected value received. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/16xxx/CVE-2026-16665.json">CVE-2026-16665</a>
    Added Reference https://github.com/mcu-tools/mcuboot/commit/133148bd5d792f781b72b8fce933ab9117780978
    Added Reference https://github.com/mcu-tools/mcuboot/commit/18c4f19e2e0e457b86bd37274a2fef4c3e6d2850
    Added Reference https://github.com/mcu-tools/mcuboot/commit/2d74b30860ac97f764367f3a66dc3b274a672244
    Added Reference https://github.com/mcu-tools/mcuboot/commit/36e56d691f4e853f2f741309751b9611689f4197
    Added Reference https://github.com/mcu-tools/mcuboot/commit/3b9159e1e04c6a09c691bdf9140bf303e3718c68
    Added Reference https://github.com/mcu-tools/mcuboot/commit/43dc9d0d97656f1c08b2ffef2f0a3c1db62cba7e
    Added Reference https://github.com/mcu-tools/mcuboot/commit/442c86b2131c119aab06ad4dde18ec62954d2808
    Added Reference https://github.com/mcu-tools/mcuboot/commit/4d9424a747de9c5e74be601aebee5239e371e21c
    Added Reference https://github.com/mcu-tools/mcuboot/commit/8e8ce11487c83975755b6ddcad69f4f42ee28977
    Added Reference https://github.com/mcu-tools/mcuboot/commit/9365411227c79a944ee72407e51a07320489e424
    Added Reference https://github.com/mcu-tools/mcuboot/commit/ab3fd3d4d563e57303fd0720bc0f0a93f5c619d0
    Added Reference https://github.com/mcu-tools/mcuboot/commit/adc0e42effb9422659c9d2d63399cdce1f297648
    Added Reference https://github.com/mcu-tools/mcuboot/commit/b0047116aa2a2cfb18f3f1bc2bd286217bc22e5c
    Added Reference https://github.com/mcu-tools/mcuboot/commit/e0872142b9d734c116b0ed7b35657dc933c3888b
    Added Reference https://github.com/mcu-tools/mcuboot/commit/e52ced626dd0391a0b7f175adf84b748b8db8795
    Added Reference https://github.com/mcu-tools/mcuboot/commit/ec006b882ce618e01e7bbddcb2e5e12cb6987e0a
    Added Reference https://github.com/mcu-tools/mcuboot/pull/3012
    Added Reference https://github.com/mcu-tools/mcuboot/security/advisories/GHSA-cr9j-p626-pwcc
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.