Skip to main content

MCUboot EUVDEUVD-2026-134631

| CVE-2026-16663 HIGH
Out-of-bounds Write (CWE-787)
2026-11-24 zephyr GHSA-r62q-q5vc-23h5
8.4
CVSS 3.1 · Vendor: zephyr
View

Attack ChainAIDerived

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

  1. Access
    Gain local access to serial/USB recovery
  2. Delivery
    Upload crafted public-key-encrypted image
  3. Exploit
    Trigger OOB write in decrypt_region_inplace()
  4. Execution
    Corrupt bootloader stack pre-authentication
  5. Impact
    Execute code in secure-boot root of trust

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires an MCUboot build compiled with MCUBOOT_ENC_IMAGES and serial recovery enabled, plus physical or local access to the device's serial/USB recovery interface (unauthenticated by design). The attacker must use a public-key encryption scheme so the AES content key can be wrapped to the device's public encryption key, letting them author a fully crafted encrypted image - including a malicious ih_hdr_size - without the image-signing private key. Two concrete trigger forms exist: (1) an oversized ih_hdr_size exceeding the sector size reaches the OOB write on the second sector onward and only affects devices whose sector is smaller than the 16-bit ih_hdr_size; (2) the first-sector TLV-clamp error needs no oversized header, so even an ordinary small encrypted image whose header and payload end within the first sector triggers it, extending reach to devices with sectors up to ~128 KiB. Key LIMITING factors: the vector is local (not network), the vulnerable encrypted-serial-recovery path must be a compiled-in, enabled configuration, and on releases before v2.0.0 (v1.9.0/v1.10.0) the overflow corrupts adjacent .bss static data rather than the stack, so a stack-smashing PoC written for current releases will not reproduce as-is.

Impact

This is a genuine high-priority issue, not a high-CVSS-but-low-real-risk case, though its reach is gated by a specific build configuration rather than being universally exploitable. The CVSS 3.1 vector (AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, 8.4) accurately captures a locally-reachable, unauthenticated, low-complexity attacker-controlled out-of-bounds write (CWE-787) that corrupts bootloader memory before any signature check and provides a path to code execution in the secure-boot root of trust. The pre-authentication nature is strong corroborating evidence: the pre-decryption signature gate is compiled out (#if 0), and with public-key encryption schemes the attacker can author a fully crafted encrypted image - including the malicious ih_hdr_size - without the image-signing private key, so authentication is genuinely bypassed. Signals to weigh against raw severity: the attack vector is LOCAL (AV:L), requiring physical or local access to the serial/USB recovery interface, and the sink is only reachable in builds with MCUBOOT_ENC_IMAGES and serial recovery enabled - this is not a remote-network mass-exploitation condition. No EPSS score was provided in the input, and the product is NOT listed in CISA KEV, so there is no evidence of active exploitation; the vuln.today decision label is 'this_week' (priority but not act_now/emergency). A proof-of-concept 2048-byte OOB write was reproduced by the reporter under AddressSanitizer, but no public exploit code is referenced in the available data. Net: treat as a serious, patch-this-week bootloader root-of-trust flaw for affected embedded deployments, tempered by local-access and non-default-configuration requirements rather than internet-wide exposure.

Exploit ScenarioDerived

An attacker with physical or local access to a device's serial/USB recovery interface (on a build with MCUBOOT_ENC_IMAGES and serial recovery enabled) uploads a crafted encrypted image whose AES content key is wrapped to the device's public encryption key - requiring no image-signing private key - and whose uint16_t ih_hdr_size field is set maliciously. Because the pre-decryption signature gate is compiled out, decrypt_region_inplace() uses the absolute header size as the stack buffer index on sectors after the first, writing attacker-controlled plaintext past the sector-sized stack VLA into adjacent frames before any authentication, yielding controllable memory corruption in the bootloader. A PoC OOB write was reproduced by the reporter under AddressSanitizer; no public exploit code is referenced in the available data.

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

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

Alert me

AnalysisAIv1 – Nov 24, 2026

Pre-authentication stack memory corruption in MCUboot's encrypted serial-recovery upload path (versions 1.9.0 through 2.5.0) lets an attacker who can reach a device's unauthenticated serial/USB recovery interface write attacker-controlled plaintext past a sector-sized stack buffer inside the bootloader, before any signature check, giving a path to code execution in the secure-boot root of trust or a denial of service. Because the AES content key is wrapped to the device's public encryption key, an attacker does not need the image-signing private key - only the ability to author and upload a crafted encrypted image. The vector is local (AV:L, PR:N), the vulnerable path must be compiled in via MCUBOOT_ENC_IMAGES plus serial recovery, and no public exploit code was identified at time of analysis; the advisory notes an AddressSanitizer reproduction of a 2048-byte out-of-bounds write.

RemediationAI

The vendor fix is merged upstream as commit 6e1465c38e3dba4849caed650ad83d0ba5c277b6 (PR #3006, https://github.com/mcu-tools/mcuboot/commit/6e1465c38e3dba4849caed650ad83d0ba5c277b6), which widens idx to uint32_t, introduces abs_off, makes idx sector-relative (hdr->ih_hdr_size - abs_off), corrects the TLV clamp to tlv_off - abs_off - idx, and adds an explicit bounds rejection returning BOOT_EBADIMAGE when idx or blk_sz exceeds chunk_sz; the advisory projects the first patched release as 2.5.1, which was not yet published at time of analysis, so confirm the tagged release or backport the commit before relying on it. Because the affected path requires a build with MCUBOOT_ENC_IMAGES and serial recovery compiled in, builds that omit either configuration are not reachable per the advisory's stated preconditions, and where the encrypted serial-recovery path cannot be patched immediately, disabling it removes the sink - at the cost of losing encrypted serial image updates on that device. The recovery interface is unauthenticated by design, so restricting physical access to the serial/USB recovery port is the remaining practical barrier until a patched build is deployed. Advisory: https://github.com/mcu-tools/mcuboot/security/advisories/GHSA-7c8v-m3pm-wh74.

Affected VersionsENISA

mcuboot 1.9.0 <2.5.1

Affected Packages

euvd mcuboot fix: 2.5.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

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

Technical ContextAI · show details

MCUboot's encrypted serial-recovery flow decrypts an uploaded image one flash sector at a time into a sector-sized stack VLA, uint8_t buf[sz], where sz is the caller's sect_size. In decrypt_region_inplace() the destination index for a sector that still overlaps the image header is computed as idx = hdr->ih_hdr_size, an absolute value, rather than the sector-relative hdr->ih_hdr_size - abs_off used by the correct sibling routine in boot/bootutil/src/loader.c:876. Since ih_hdr_size is a uint16_t copied verbatim from the uploaded header and the pre-decryption signature/hash gate is compiled out (#if 0 in decrypt_image_inplace()), an attacker can set a header size larger than the sector and cause boot_enc_decrypt() to write into adjacent stack frames from the second sector onward - a CWE-787 out-of-bounds write. A second defect in the same window computation affects the first sector: the TLV clamp blk_sz = tlv_off - (off + bytes_copied) is measured from the sector start rather than from idx, so an image whose header and payload both end inside the first sector is decrypted ih_hdr_size bytes too far, into the TLV area and potentially past buf; this form needs no oversized header and extends reach to devices with sectors up to roughly 128 KiB. The sink is entered via bs_upload() calling boot_handle_enc_fw() (boot/boot_serial/src/boot_serial.c:1208) after upload, with no authentication by design. The flaw was introduced by 953a7618 in v1.9.0, where the buffer was a file-scope static uint8_t buf[SOC_FLASH_ERASE_BLK_SZ] in .bss inside boot/zephyr/single_loader.c, and was relocated to boot/boot_serial/src/boot_serial_encryption.c and changed to stack storage by commit c9fa6088 in v2.0.0.

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

Reached via the local serial/USB recovery interface (AV:L) with no authentication by design (PR:N) and a deterministic attacker-controlled write (AC:L); bootloader code execution yields full C/I/A impact.

3.1 AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/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
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

MCUboot's encrypted serial-recovery path contains an attacker-controlled out-of-bounds stack write in decrypt_region_inplace() in boot/boot_serial/src/boot_serial_encryption.c. The routine decrypts an uploaded encrypted image one flash sector at a time into a sector-sized stack VLA buf[sz], but when the current sector is still inside the image header it sets the destination index to the absolute header size (idx = hdr->ih_hdr_size; at boot/boot_serial/src/boot_serial_encryption.c:156) and then decrypts into &buf[idx]. The correct sibling routine boot/bootutil/src/loader.c:876 uses the sector-relative idx = hdr->ih_hdr_size - abs_off; the serial path is missing the - abs_off term, so for any sector after the first the index runs past the end of the stack buffer.

The ih_hdr_size field is a uint16_t taken verbatim from the uploaded image header. On the second sector onward, when ih_hdr_size exceeds the sector size, &buf[idx] points beyond buf and boot_enc_decrypt() writes attacker-controlled plaintext into adjacent stack frames. The path is reached pre-authentication: bs_upload() calls boot_handle_enc_fw() (boot/boot_serial/src/boot_serial.c:1208) after upload, and the pre-decryption signature gate in decrypt_image_inplace() is compiled out (#if 0 at boot/boot_serial/src/boot_serial_encryption.c:226-233), so the header is never validated before decryption.

A second error in the same window computation affects the first sector. When a sector holds both the end of the header and the start of the TLV area, the decrypt length is clamped to tlv_off - (off + bytes_copied), measured from the start of the sector rather than from idx (boot/boot_serial/src/boot_serial_encryption.c:166). An encrypted image whose header and payload end within the first sector is therefore decrypted for ih_hdr_size bytes more than it should be: into the TLV area and, when the image ends near the end of the sector, past buf. This form needs no oversized header, so even an ordinary small encrypted image can trigger it, and it reaches devices with sectors of up to about 128 KiB rather than only those whose sector is smaller than the 16-bit ih_hdr_size.

Reaching the sink requires a build with MCUBOOT_ENC_IMAGES and serial recovery enabled, and access to the device's serial/USB recovery interface (unauthenticated by design). With the public-key encryption schemes the AES content key is wrapped to the device's public encryption key, so an attacker can author a fully crafted encrypted image - including a malicious ih_hdr_size - without the image-signing private key. The result is a controllable stack memory-corruption inside the bootloader before any signature check, providing a path to code execution in the secure-boot root of trust that bypasses image authentication, as well as a denial-of-service. A 2048-byte out-of-bounds write was reproduced under AddressSanitizer (sz=4096, off=4096, ih_hdr_size=6144).

On releases before v2.0.0 (v1.9.0 and v1.10.0) the destination is a file-scope static uint8_t buf[SOC_FLASH_ERASE_BLK_SZ] in .bss rather than the stack VLA described above - the code then lived in boot/zephyr/single_loader.c, before commit c9fa6088 relocated it to boot/boot_serial/src/boot_serial_encryption.c and changed the buffer's storage class. The out-of-bounds write is equally real and equally pre-authentication on those releases, but it corrupts adjacent static data rather than the stack, so a stack-smashing proof of concept written against a current release will not reproduce as-is there.

Technical POC Analysis

CWE-787 (out-of-bounds write) in decryptregioninplace() at boot/bootserial/src/bootserialencryption.c:126 onward.

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

A high-severity memory corruption flaw in MCUboot (CVE-2026-16663) affects devices using the encrypted serial-recovery upload path, potentially allowing an attacker with physical access to the unauthenticated recovery interface to execute code in the secure-boot root of trust or cause a denial of service. This undermines the integrity of the chain of trust for affected products, impacting device security and regulatory compliance. Leadership should prioritize remediation because exploitation could lead to persistent compromise of the boot process and erosion of customer trust.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 74% exploitable
Prevalence
Medium
widely used embedded secure bootloader, but confined to IoT/embedded devices
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.4%
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

42
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +42
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.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

CVE-2026-16665 HIGH
7.4 Nov 24

MCUboot 1.1.0 and later can be driven to boot un-revalidated firmware in the primary slot because security-critical inva

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

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