Skip to main content

MCUboot EUVDEUVD-2026-134632

| CVE-2026-16665 HIGH
Improper Check for Unusual or Exceptional Conditions (CWE-754)
2026-11-24 zephyr GHSA-xrmf-x2rw-f2xh
7.4
CVSS 3.1 · Vendor: zephyr
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain DFU/serial-recovery flash write access
  2. Delivery
    Paint inconsistent swap-status trailer in A2 slot
  3. Exploit
    assert(0) no-op under NDEBUG skips abort
  4. Execution
    Partial-swap resume completes on bad metadata
  5. Impact
    Primary slot boots un-revalidated unsigned image

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A10:2025 - Mishandling of Exceptional Conditions
ASVS 5.0
V16 - Security Logging and Error Handling Unusual condition handling
Exploitation Conditions

Exploitation of the worst (secure-boot-bypass) instance requires the conjunction of: (1) a release/production build with NDEBUG defined, so the guarding assert()/assert(0) compiles to a no-op; (2) MCUBOOT_VALIDATE_PRIMARY_SLOT disabled - a non-default opt-out, since Zephyr's BOOT_VALIDATE_SLOT0 defaults to y and provides re-validation as a backstop when left on; (3) a swap-based backend (swap_move/swap_offset/swap_scratch); and (4) A2-level flash-write access to the swap-status trailer via DFU or serial recovery - secondary and scratch trailers are A2-writable by definition, and reaching the PRIMARY trailer additionally requires MCUBOOT_SERIAL_RECOVERY (boot_serial.c opens the primary slot for writing from offset 0). Affected versions are >= 1.1.0. Limiting factors that reduce realistic risk: the attack needs local/on-device DFU/serial-recovery access rather than a network path; the worst case needs the non-default validation-off configuration; and builds keeping primary-slot validation enabled retain a signature re-check that blocks the un-revalidated boot, leaving only the robustness/availability gap.

Impact

This is a genuine secure-boot-bypass class issue but with a deliberately narrow reachability envelope, so raw severity should be read against several gating conditions. The provided CVSS 3.1 vector (AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H, 7.4 HIGH) is internally consistent with the advisory: AV:L reflects that the attacker must reach the flash-write boundary via DFU/serial-recovery rather than a network path, and AC:H reflects that the worst instance only materializes in a non-default build (NDEBUG release AND MCUBOOT_VALIDATE_PRIMARY_SLOT disabled, which is an opt-out since BOOT_VALIDATE_SLOT0 defaults y). PR:N is defensible because the DFU/serial-recovery write surface is unauthenticated by design, but note the practical precondition of local/physical or on-device recovery access, so 'unauthenticated' should not be read as 'remote'. No EPSS score, no CISA KEV entry, and no confirmed public exploit were provided - all three exploitation-pressure signals are therefore absent or unknown, which argues against treating this as an active-fire emergency. The vuln.today decision label is 'this_week' (not act_now/emergency), aligning with the absence of KEV/EPSS pressure. Net: a real, correctly-triaged priority for embedded teams shipping swap-based MCUboot with primary-slot validation turned off, but default-configured deployments retain re-validation as a backstop for the worst instance and carry mainly the robustness gap - so this is high-severity-conditional rather than high-real-risk-universal. One signal tension to verify: the input header says 'Patch: Available from vendor' and lists 15 patch commits, yet the advisory body states 'No fix has been released yet' - fix code exists in-repo but a formal tagged release may still be pending.

Exploit ScenarioDerived

On a release build (NDEBUG) with MCUBOOT_VALIDATE_PRIMARY_SLOT disabled and a swap-based backend, an attacker with DFU/serial-recovery flash-write access crafts an inconsistent swap-status trailer (erased_sections > 1) in an A2-writable slot. Because the intended abort is only an assert(0) that compiles to a no-op under NDEBUG, the partial-swap resume path does not halt and is not re-validated, so boot_complete_partial_swap() finishes the swap on attacker-influenced metadata and the primary slot boots un-revalidated code - a secure-boot bypass. No confirmed public exploit was provided; the only public artifacts are the fix commits/diffs, which demonstrate the mechanism but are not weaponized exploit code.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 24, 2026

MCUboot 1.1.0 and later can be driven to boot un-revalidated firmware in the primary slot because security-critical invariants on the swap-resume, image-swap and validation paths are enforced only by assert(), which compiles to a no-op in release builds where NDEBUG is defined. An attacker who can write the swap-status trailer through the DFU or serial-recovery flash boundary can craft an inconsistent status (erased_sections > 1) that the code intends to abort, but in a production build the check falls through and the partial swap completes on attacker-influenced metadata. Reaching the secure-boot-bypass outcome requires a narrow conjunction: a release build, MCUBOOT_VALIDATE_PRIMARY_SLOT disabled (a non-default opt-out), a swap-based backend, and A2-level write access to the swap-status trailer, with primary-trailer writes additionally requiring MCUBOOT_SERIAL_RECOVERY; builds that keep primary-slot validation enabled retain a signature re-check and carry only the robustness/availability gap. No public exploit code has been identified at time of analysis and the issue is not confirmed actively exploited (CISA KEV).

RemediationAI

Apply the upstream fixes referenced in the advisory, which replace the security-critical assert() guards with real fail-closed checks: commit 36e56d691f4e853f2f741309751b9611689f4197 (loader.c error propagation and FIH_FAILURE on failed swap completion) plus the companion commits 43dc9d0d, e0872142, e52ced62, 3b9159e1, 2d74b308, 133148bd, 442c86b2, 93654112, 8e8ce114, 18c4f19e, ec006b88, 4d9424a7, adc0e42e and b0047116; upstream fix commits are available, but a released patched version is not independently confirmed and package tracking lists MCUboot as not yet patched, so verify against the advisory at https://github.com/mcu-tools/mcuboot/security/advisories/GHSA-cr9j-p626-pwcc before relying on a release. Until a patched build is deployed, the most effective compensating control is to keep MCUBOOT_VALIDATE_PRIMARY_SLOT enabled (leave Zephyr's BOOT_VALIDATE_SLOT0 at its default y), which restores signature re-validation as a backstop for the inconsistent-status instance and leaves only the robustness/availability gap, at the cost of additional boot-time hashing and validation latency. Builds that keep assertions live (not defining NDEBUG) retain the fail-closed abort but lose the performance and size benefits of release optimization. Disabling MCUBOOT_SERIAL_RECOVERY removes the confirmed path by which the primary trailer becomes writable and narrows the attack to secondary/scratch trailers, at the cost of losing field recovery and DFU-over-serial capability; where recovery must stay enabled, restrict physical/logical access to the recovery interface. Because the worst case requires A2-level flash-write access rather than a network path, enforcing debug-port lockout and authenticated update transport (where the platform supports it) limits who can reach the vulnerable boundary; the current triage decision places remediation in a this-week window.

Affected VersionsENISA

mcuboot 1.1.0 ≤*

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

MCUboot is a secure bootloader for 32-bit MCUs that manages primary/secondary image slots, swap state machines and signature validation through the bootutil library (swap_move.c, swap_offset.c, swap_scratch.c, loader.c, bootutil_misc.c) and the serial-recovery/DFU upload path in boot_serial.c. The root cause class is CWE-754 (improper check of exceptional conditions): the code uses assert()/assert(0) as a control-flow safety guard, and because assert() expands to a no-op when NDEBUG is defined, an invariant the code intends to halt on is simply absent in production builds. In the swap-resume status read, the erased_sections > 1 inconsistency is detected and logged, and under !defined(MCUBOOT_VALIDATE_PRIMARY_SLOT) the only intended abort is assert(0); with assertions compiled out, execution falls through to compute bs->op/idx/state from the inconsistent status and returns success, so boot_complete_partial_swap() finishes the swap on bad metadata. A parallel defect exists in the resume branch of loader.c, where swap_size is read from a trailer after assert(fap != NULL) and assert(rc == 0); boot_find_status() iterates {scratch, primary} and, absent a valid magic match, returns the last area (primary) rather than NULL, so that assert cannot fire even in a debug build and no fail-closed handling remains under NDEBUG. The attacker-influenceable flash boundary is confirmed by boot_serial.c, which opens flash_area_id_from_multi_image_slot(img_num, 0) (the primary slot) for writing from offset 0 at area_size, making the primary swap-status/magic writable under MCUBOOT_SERIAL_RECOVERY; secondary and scratch trailers are writable by definition in any DFU upload. Zephyr's Kconfig defaults BOOT_VALIDATE_SLOT0 (which defines MCUBOOT_VALIDATE_PRIMARY_SLOT) to y, so the exploitable configuration is a deliberate non-default opt-out. Repairs in the upstream commits convert these asserts into error returns propagated up through boot_prepare_image_for_update() and context_boot_go(), setting FIH_FAILURE and refusing to boot.

Know when Mcuboot gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (zephyr) PRIMARY 7.4 HIGH
AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 7.4 HIGH

AV:L because exploitation needs DFU/serial-recovery flash-write access; AC:H for the non-default NDEBUG + validation-off + crafted-inconsistent-status preconditions; PR:N as the DFU surface is unauthenticated; booting unsigned code yields full C/I/A compromise.

3.1 AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:L/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (zephyr).

CVSS VectorVendor: zephyr

Attack Vector
Local
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

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)

Technical POC Analysis

CWE-754 (improper check for unusual conditions), manifesting as a security invariant enforced solely by assert(), which the C standard defines as a no-op when NDEBUG is defined - i.e.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

MCUboot, the secure bootloader used in many embedded and IoT products, contains a high-severity flaw (CVE-2026-16665) that, under a narrow configuration combination, can allow an attacker to force the device to boot firmware that was never revalidated. Devices are only affected if they ship release builds with primary-slot validation disabled, a swap-based backend, and accessible swap-status trailer writes via DFU or serial recovery; most builds retaining default validation retain a signature re-check. Leadership should care because affected fleets could face integrity compromise of the boot chain, undermining device trust and regulatory posture, though the required preconditions and attacker access significantly limit exposure for default configurations.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.6%
Top 60% exploitable
Prevalence
Medium
widely used embedded/IoT bootloader, but vulnerable config is a non-default opt-out
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.6%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +37
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

CVE-2026-16663 HIGH
8.4 Nov 24

Pre-authentication stack memory corruption in MCUboot's encrypted serial-recovery upload path (versions 1.9.0 through 2.

CVE-2026-16664 MEDIUM
5.1 Nov 13

An out-of-bounds read of MCUboot's static flash-area slot table on the Zephyr port lets anyone who can reach the unauthe

CVE-2026-16659 MEDIUM
4.0 Nov 13

NULL pointer dereference in MCUboot's serial-recovery image-upload handler (bs_upload) crashes the bootloader during a r

CVE-2026-127916 LOW
2.9 Nov 13

MCUboot 1.6.0 through 2.4.0 hashes a candidate image over ih_hdr_size + ih_img_size + ih_protect_tlv_size taken from the

CVE-2026-16671 LOW
2.9 Nov 13

An out-of-bounds stack write in MCUboot's legacy split-image validation routine (split_image_check() in boot/bootutil/sr

CVE-2026-16668 LOW
2.4 Nov 24

Unbounded CBOR recursion in MCUboot's serial-recovery command parser lets an unauthenticated party crash or hang a devic

CVE-2026-16662 LOW
2.4 Nov 13

MCUboot's measured-boot record builder leaks uninitialised bootloader stack contents into the measurement field when it

CVE-2026-127915 LOW
2.0 Nov 13

An out-of-bounds flash read in MCUboot's TLV iterator, bootutil_tlv_iter_next(), lets a crafted firmware image drive the

CVE-2026-128091 LOW
2.0 Nov 13

MCUboot builds that use the TinyCrypt AES-CTR backend leave the expanded AES-128 content-encryption key schedule sitting

CVE-2026-127928 LOW
2.0 Nov 13

MCUboot 1.9.0 through 2.4.0 built with encrypted-image support (MCUBOOT_ENC_IMAGES / Zephyr CONFIG_BOOT_ENCRYPT_IMAGE) t

References

Advisories & patches
PATCH https://github.com/mcu-tools/mcuboot/commit/133148bd5d792f781b72b8fce933ab9117780978 PATCH https://github.com/mcu-tools/mcuboot/commit/18c4f19e2e0e457b86bd37274a2fef4c3e6d2850 PATCH https://github.com/mcu-tools/mcuboot/commit/2d74b30860ac97f764367f3a66dc3b274a672244 PATCH https://github.com/mcu-tools/mcuboot/commit/36e56d691f4e853f2f741309751b9611689f4197 PATCH https://github.com/mcu-tools/mcuboot/commit/3b9159e1e04c6a09c691bdf9140bf303e3718c68 PATCH https://github.com/mcu-tools/mcuboot/commit/43dc9d0d97656f1c08b2ffef2f0a3c1db62cba7e PATCH https://github.com/mcu-tools/mcuboot/commit/442c86b2131c119aab06ad4dde18ec62954d2808 PATCH https://github.com/mcu-tools/mcuboot/commit/4d9424a747de9c5e74be601aebee5239e371e21c PATCH https://github.com/mcu-tools/mcuboot/commit/8e8ce11487c83975755b6ddcad69f4f42ee28977 PATCH https://github.com/mcu-tools/mcuboot/commit/9365411227c79a944ee72407e51a07320489e424 PATCH https://github.com/mcu-tools/mcuboot/commit/ab3fd3d4d563e57303fd0720bc0f0a93f5c619d0 PATCH https://github.com/mcu-tools/mcuboot/commit/adc0e42effb9422659c9d2d63399cdce1f297648 PATCH https://github.com/mcu-tools/mcuboot/commit/b0047116aa2a2cfb18f3f1bc2bd286217bc22e5c PATCH https://github.com/mcu-tools/mcuboot/commit/e0872142b9d734c116b0ed7b35657dc933c3888b PATCH https://github.com/mcu-tools/mcuboot/commit/e52ced626dd0391a0b7f175adf84b748b8db8795 PATCH https://github.com/mcu-tools/mcuboot/commit/ec006b882ce618e01e7bbddcb2e5e12cb6987e0a ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-16665 REF https://github.com/mcu-tools/mcuboot/pull/3012 REF https://github.com/mcu-tools/mcuboot/security/advisories/GHSA-cr9j-p626-pwcc

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy