Skip to main content

MCUboot EUVDEUVD-2026-124790

| CVE-2026-16664 MEDIUM
Improper Validation of Array Index (CWE-129)
2026-11-13 zephyr GHSA-4mp4-cg6q-qvjw
5.1
CVSS 3.1 · Vendor: zephyr
View

Attack ChainAIDerived

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

  1. Access
    Access serial/SMP recovery console
  2. Exploit
    Send crafted MCUmgr upload with out-of-range image field
  3. Execution
    Unchecked img_num indexes all_slots[] table out of bounds
  4. Impact
    Bus/hard fault denies bootloader (DoS)

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Array index validation
Exploitation Conditions

Requires: (1) local access to the device's serial / SMP (MCUmgr) recovery console, which is unauthenticated by design, with the device in serial-recovery mode; (2) serial recovery enabled (MCUBOOT_SERIAL); (3) the default non-direct upload path - MCUBOOT_SERIAL_DIRECT_IMAGE_UPLOAD DISABLED (the direct path is safe, its flash_area_id_from_direct_image() switch returns -EINVAL for unknown indices); and (4) the Zephyr port's array-backed slot layout, i.e. NOT CONFIG_SINGLE_APPLICATION_SLOT (the single-app path uses a constant partition id). The malicious 'image' value is accepted on the off==0 packet before any image signature verification. It is NOT gated on a multi-image build: MCUBOOT_IMAGE_NUMBER defaults to 1, so even a default single-image build is vulnerable for any image index >= 1 (affected versions >= 2.0.0). Limiting factors: the CVSS LOCAL vector means the attacker must reach the serial/SMP console (physical access or an otherwise exposed recovery transport), and builds using CONFIG_SINGLE_APPLICATION_SLOT or exclusively the direct-image-upload path are not affected.

Impact

CVSS 3.1 base score is 5.1 (medium), vector AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L - low complexity and no privileges, but a LOCAL attack vector: exploitation requires access to the device's serial / SMP (MCUmgr) recovery console, which is unauthenticated by design. No EPSS probability was supplied, and the CVE is not on CISA KEV, so there is no confirmed active exploitation. The vuln.today decision label is 'this_month' (not act_now/emergency), consistent with a locally-reachable, config-gated embedded bug. A public PoC reference exists - a source-slice ASan harness named in the NVIDIA Project Vanessa report - but it is not verified as working exploit code, and that report notes full proof needs generated Zephyr flash maps. The realistic, reliable impact is denial of service (a bus/hard fault of the bootloader during recovery); the wrong-partition erase/write (integrity) path is conditional on an out-of-range read returning a garbage flash-area id that happens to match a valid non-image partition, so I:L is appropriately modest. Net: a genuine but bounded issue - worth patching on any device that exposes serial recovery because nothing authenticates the path, but not a remote mass-exploitation priority. Data conflict to resolve: the feed reports a vendor patch is available (commit 183a05f2) while the GHSA advisory body still states 'No fix has been released yet' - verify fix status with the vendor.

Exploit ScenarioDerived

An attacker with local access to a device's serial / SMP recovery console sends a crafted MCUmgr image-upload request whose off==0 packet carries the optional 'image' field set out of range (e.g. a large value, or 0xFFFFFFFF which converts to signed -1). Because the index is latched before any signature check and never bounds-checked, it indexes the static all_slots[] table out of bounds and triggers a bus/hard fault, denying the bootloader during recovery; a source-slice ASan PoC is referenced in the reports but is not verified as working public exploit code. Per AV:L/AC:L/PR:N/UI:N, no authentication or user interaction is needed once the console is reachable.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Nov 13, 2026

An out-of-bounds read of MCUboot's static flash-area slot table on the Zephyr port lets anyone who can reach the unauthenticated serial/SMP (MCUmgr) recovery console crash the bootloader during recovery or, less reliably, redirect an uploaded image to a flash partition outside the configured image set. The flaw is in the default non-direct serial upload path: bs_upload() latches the host-supplied 32-bit 'image' field on the off==0 packet without a range check and passes it to flash_area_id_from_multi_image_slot() before any image signature verification, affecting MCUboot 2.0.0 and later - and because MCUBOOT_IMAGE_NUMBER defaults to 1, even default single-image builds are exposed for any index of 1 or greater. CVSS 3.1 is 5.1 (AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L), reflecting low complexity and no privileges required but a LOCAL vector that requires access to the recovery transport; no active exploitation is confirmed (not in CISA KEV) and no verified working exploit code is known, although the vendor advisory cites a source-slice ASan proof-of-concept harness.

RemediationAI

Vendor fix is upstream as commit 183a05f256bdbbac86edcb048958da59018f814e, which adds a range check on img_num in bs_upload() before the slot lookup; the GHSA at https://github.com/mcu-tools/mcuboot/security/advisories/GHSA-8rcq-2mgr-fhp8 still states at the time of writing that no tagged release containing the fix has shipped, so this is an upstream commit fix with a released patched version not independently confirmed - track the advisory and rebuild from a release that includes it. The advisory's prescribed guard rejects img_num >= BOOT_IMAGE_NUMBER on the off==0 packet while the value is still unsigned (a guard applied after conversion to int would not reject the 0xFFFFFFFF -> -1 case), and it recommends __flash_area_ids_for_slot() also bounds-check its arguments as defence in depth; note the cited commit diff shows the comparison as img_num > BOOT_IMAGE_NUMBER, so verify the branch you deploy rejects the equality case too, and note the second unchecked use of img_num at boot_serial.c under MCUBOOT_ENC_IMAGES. Where rebuilds are not immediately possible, the evidence-supported alternatives are to build with CONFIG_SINGLE_APPLICATION_SLOT (constant partition id, no array indexing - but this removes A/B image slots and rollback capability) or to enable MCUBOOT_SERIAL_DIRECT_IMAGE_UPLOAD, whose flash_area_id_from_direct_image() switch returns -EINVAL for unknown indices (this changes the upload protocol/semantics the recovery host must use); restricting physical and transport access to the serial/SMP recovery console reduces exposure but does not remove the defect, since that console is unauthenticated by design.

Affected VersionsENISA

mcuboot 2.0.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's serial recovery implements the MCUmgr SMP protocol: bs_upload() decodes a CBOR image-upload request with zcbor_uint32_decode() into a full 32-bit img_num_tmp, latches it into img_num when the chunk offset is zero, and then calls flash_area_open(flash_area_id_from_multi_image_slot(img_num, 0), &fap). On the Zephyr port that helper (boot/zephyr/flash_map_extended.c) expands to FLASH_AREA_IMAGE_PRIMARY(image_index), which resolves to __flash_area_ids_for_slot() in boot/zephyr/include/sysflash/sysflash.h and indexes the static const int all_slots[] table as all_slots[img * 2 + slot]. The table holds only MCUBOOT_IMAGE_NUMBER * 2 entries, so any index at or above MCUBOOT_IMAGE_NUMBER reads past the end (CWE-129). The regression was introduced by commit da65db00 'zephyr: Provide slot definitions for three images', first released in v2.0.0, which replaced a bounded ternary mapping with the unchecked array lookup; the unvalidated serial-upload field reaching it is older. A second wrinkle is type confusion: flash_area_id_from_multi_image_slot() takes a signed int while img_num is uint32_t, so an image value of 0xFFFFFFFF converts to -1 and indexes all_slots[-2], reading before the table (CWE-192), and large positive values read past the end; the img * 2 multiply is done in int, so a wild offset produces a bus/hard fault and a reliable bootloader denial of service. Moderately out-of-range indices instead return adjacent .rodata as a garbage flash-area id that is handed to flash_area_open(); that normally fails with MGMT_ERR_EINVAL, but if the garbage id collides with a valid non-image partition the following erase/write can target memory outside the image set (CWE-787). The attacker-supplied value is never echoed back, so the advisory states there is no information disclosure. The MCUBOOT_SERIAL_DIRECT_IMAGE_UPLOAD path is not affected, since flash_area_id_from_direct_image() is a bounded switch that returns -EINVAL for unknown indices, and CONFIG_SINGLE_APPLICATION_SLOT builds use a constant partition id with no array lookup. There is also a second unchecked use of the same value in bs_upload() at boot_serial.c around line 1201 under MCUBOOT_ENC_IMAGES.

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 5.1 MEDIUM
AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
vuln.today AI 5.1 MEDIUM

Needs local access to the unauthenticated serial recovery console (AV:L, PR:N, UI:N) and is trivially triggered (AC:L); reliable DoS gives A:L, conditional wrong-partition write gives I:L, value never echoed so C:N.

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

Primary rating from Vendor (zephyr).

CVSS VectorVendor: zephyr

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

DescriptionCVE.org

MCUboot's Zephyr serial-recovery upload handler bs_upload() in boot/boot_serial/src/boot_serial.c decodes the host-supplied image field of an MCUmgr image-upload request into img_num (a full 32-bit value) and latches it on the off == 0 packet without any range check. It then passes img_num straight to flash_area_id_from_multi_image_slot(img_num, 0), which on the Zephyr port resolves to __flash_area_ids_for_slot() in boot/zephyr/include/sysflash/sysflash.h and indexes the static const int all_slots[] table as all_slots[img_num 2]. That table holds only MCUBOOT_IMAGE_NUMBER 2 entries, so any img_num >= MCUBOOT_IMAGE_NUMBER is an out-of-bounds read.

The path is reachable by anyone with access to the serial / SMP recovery console, which is unauthenticated by design, and the bad value is supplied before any image signature is verified. The defect is specific to the default non-direct upload path (MCUBOOT_SERIAL_DIRECT_IMAGE_UPLOAD disabled) on the Zephyr port with the array-backed slot layout (not CONFIG_SINGLE_APPLICATION_SLOT). It is not gated on a multi-image configuration: MCUBOOT_IMAGE_NUMBER defaults to 1, so even a default single-image build is affected for any image >= 1. The MCUBOOT_SERIAL_DIRECT_IMAGE_UPLOAD path is safe (its flash_area_id_from_direct_image() switch returns -EINVAL for unknown indices).

flash_area_id_from_multi_image_slot() takes a signed int image_index while img_num is uint32_t, so the attacker controls the sign of the index as well as its magnitude: an image of 0xFFFFFFFF converts to -1 and reads all_slots[-2], off the front of the table, while large positive values read off the end (CWE-192). Either way the index multiply img * 2 is performed in int, so a wild offset yields a bus/hard fault, giving a reliable denial of service of the bootloader during recovery. For moderately out-of-range indices the read returns adjacent .rodata as a garbage flash-area id that is handed to flash_area_open(); this normally fails with MGMT_ERR_EINVAL, but if the garbage id happens to match a valid non-image partition, the subsequent erase/write can target a partition outside the image set (CWE-787). The attacker-supplied value is never echoed back, so there is no information disclosure. The fix is to reject img_num >= BOOT_IMAGE_NUMBER on the off == 0 packet, before the slot lookup. The comparison must be made on the unsigned img_num: an equivalent guard applied after the conversion to int would not reject the negative case above. __flash_area_ids_for_slot() should bounds-check its own arguments as defence in depth. This vulnerability was reported independently twice: by NVIDIA Project Vanessa on 2026-06-22, and by Kai Phan (@kaimandalic) on 2026-07-19 as GHSA-8v33-88p6-jffj, which is closed as a duplicate of this advisory. Both original reports are reproduced in full below.

Threat Intelligence Overview

EPSS Score
0.1%
Top 99% exploitable
Prevalence
High
de facto secure bootloader for Zephyr and Nordic embedded IoT devices
Social Media
1
Sightings
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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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· derived
High

Priority Score

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

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

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