Skip to main content

MCUboot EUVDEUVD-2026-124812

| CVE-2026-16662 LOW
Use of Uninitialized Variable (CWE-457)
2026-11-13 zephyr GHSA-wwg9-9xxp-r5fj
2.4
CVSS 3.1 · Vendor: zephyr
View

Attack ChainAIDerived

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

  1. Access
    Gain physical/flash-write access to device
  2. Delivery
    Write image with short EXPECTED_HASH TLV
  3. Exploit
    Bootloader skips hash validation (validation off)
  4. Execution
    boot_save_boot_status reads short TLV, leaves stale tail
  5. Persist
    memcpy copies full buffer into boot record
  6. Impact
    Stack residue exfiltrated via attestation to remote verifier

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Variable initialization checks
Exploitation Conditions

Exploitation requires ALL of the following: (1) the build enables MCUBOOT_MEASURED_BOOT so boot_save_boot_status() runs and writes the boot record; (2) primary-slot hash validation is turned OFF - specifically the swap/overwrite loader built without MCUBOOT_VALIDATE_PRIMARY_SLOT, or the Zephyr single_loader.c without it (including the MCUBOOT_VALIDATE_PRIMARY_SLOT_ONCE variant that skips re-validation after a recorded success) - since bootutil_img_validate() otherwise rejects any hash TLV whose length is not exactly sizeof(hash) and Zephyr's CONFIG_BOOT_VALIDATE_SLOT0 defaults to y; (3) the attacker can place a crafted image with a short EXPECTED_HASH TLV, which needs physical or flash-write access (or serial-recovery upload in a single-slot build, or a TOCTOU change to tamperable external flash between validation and the boot-record read); and (4) a downstream attestation service actually forwards the measurement field off-device for the leak to be observable. Limiting factors: direct-XIP and RAM-load strategies validate unconditionally and are NOT affected; default builds fail closed; impact is capped at IMAGE_HASH_SIZE-1 (up to 63) bytes and, in analyzed configs, is bootloader metadata rather than secrets.

Impact

This is a genuinely low-priority, defense-in-depth issue, and the available signals agree rather than conflict. The CVSS 3.1 vector (AV:P/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N, base 2.4) is consistent with the description: the only impact is a small confidentiality leak (C:L) with no integrity or availability effect, and the physical attack vector (AV:P) reflects that placing the crafted image requires physical or flash-write access to the device. The vuln.today decision label is 'monitor', the lowest urgency tier, which aligns with the low CVSS and the absence of any exploitation pressure. There is no CISA KEV listing, no EPSS score supplied, and no public exploit identified at time of analysis - the only references are the fix commit and the GHSA advisory, not proof-of-concept code. Critically, exploitability is gated behind a non-default configuration: the leak is only reachable under MCUBOOT_MEASURED_BOOT AND with primary-slot validation turned off (default Zephyr builds set CONFIG_BOOT_VALIDATE_SLOT0=y, which fails closed on a short hash TLV). The information disclosed is bootloader internal state (TLV offsets, flash addresses, loop state), not key material, in the configurations analyzed. The one caveat worth stating: what occupies that stack region is configuration- and code-path-dependent, so the advisory cannot guarantee key material never lands there in some integration - but no evidence of such a case is provided. Net: a real, confirmed-and-patched defect, but a low-real-risk one that does not warrant emergency action.

Exploit ScenarioDerived

In a device built with MCUBOOT_MEASURED_BOOT but with primary-slot validation disabled, an attacker with physical or flash-write access places an image carrying an EXPECTED_HASH TLV shorter than IMAGE_HASH_SIZE. On boot, boot_save_boot_status() copies the full fixed-size buffer into the measured-boot record, so up to 63 bytes of uninitialised bootloader stack are embedded in the attestation measurement that a downstream service later forwards to a remote verifier. No public exploit code is identified; the physical attack vector and config dependency make this a targeted, low-yield leak rather than a remote threat.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.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

MCUboot's measured-boot record builder leaks uninitialised bootloader stack contents into the measurement field when it processes an image whose EXPECTED_HASH_TLV is shorter than IMAGE_HASH_SIZE, exposing up to 63 bytes of stale stack memory to any attestation service that forwards the record off-device. The flaw only bites in builds where MCUBOOT_MEASURED_BOOT is enabled and primary-slot validation has been turned off (swap/overwrite loader without MCUBOOT_VALIDATE_PRIMARY_SLOT, or Zephyr's single-slot loader including the VALIDATE_PRIMARY_SLOT_ONCE variant), and placing the crafted image requires physical or flash-write access or a serial-recovery upload; a TOCTOU change to tamperable external flash between validation and the boot-record read is a further path. Default builds fail closed because bootutil_img_validate() rejects non-exact hash TLV lengths, and the direct-XIP and RAM-load strategies are not affected; no public exploit code and no active exploitation have been reported, and vendor-released fixes are available in 2.5.0.

RemediationAI

Vendor-released patch: upgrade to MCUboot 2.5.0, which rejects any EXPECTED_HASH_TLV whose length is not exactly IMAGE_HASH_SIZE (commit 5098d8eef1139abd3d821d8138a6321d656dcd3e, PR https://github.com/mcu-tools/mcuboot/pull/2802); release lines that have not taken the backport remain affected, so confirm the fixed version for your branch against the advisory https://github.com/mcu-tools/mcuboot/security/advisories/GHSA-779w-4x76-5chf. Where upgrading is not immediately possible, the documented limiting factor is to keep primary-slot validation enabled: builds that retain MCUBOOT_VALIDATE_PRIMARY_SLOT (and Zephyr's default CONFIG_BOOT_VALIDATE_SLOT0=y) reject the malformed hash TLV in bootutil_img_validate() before boot_save_boot_status() runs. Be aware that enabling validation has a functional cost - the bootloader will refuse to boot images whose hash TLV is malformed, which is a fail-closed behaviour that may surface previously tolerated image-signing errors, and the MCUBOOT_VALIDATE_PRIMARY_SLOT_ONCE variant still skips re-validation after a recorded success, so it does not fully close the path. Direct-XIP and RAM-load strategies are already unaffected. Additionally, restrict physical and flash-write access, and disable or authenticate serial recovery in single-slot builds, since the serial-recovery upload writes the primary slot directly and can place the crafted image; disabling serial recovery removes a field-recovery path, so weigh that against serviceability.

Affected VersionsENISA

mcuboot 1.6.0 <2.5.0

Affected Packages

euvd mcuboot fix: 2.5.0

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

boot_save_boot_status() in boot/bootutil/src/boot_record.c declares a stack buffer image_hash[IMAGE_HASH_SIZE] without zero-initialisation (CWE-457, use of uninitialised variable). The EXPECTED_HASH_TLV handler validated only the upper bound (len > sizeof(image_hash)) and then read exactly len bytes, so a TLV shorter than IMAGE_HASH_SIZE left the tail of the buffer holding residual stack data; the subsequent memcpy(buf + offset, image_hash, sizeof(image_hash)) copied the fixed buffer size rather than len, moving that residue into the measured-boot record. IMAGE_HASH_SIZE is 32, 48 or 64 bytes depending on the hash backend (boot/bootutil/include/bootutil/crypto/sha.h), which bounds the disclosure at IMAGE_HASH_SIZE - 1 bytes. The normal validation path in boot/bootutil/src/image_validate.c rejects any hash TLV whose length is not exactly sizeof(hash), so the short TLV can only reach this code when primary-slot validation is disabled - loader.c checks only IMAGE_MAGIC before calling boot_add_shared_data() in that configuration, and boot/zephyr/single_loader.c similarly gates validation on MCUBOOT_VALIDATE_PRIMARY_SLOT. In such builds the recorded measurement is already the attacker-supplied unverified EXPECTED_HASH_TLV, so attestation integrity is not further weakened; the added risk is only outbound disclosure of bootloader-internal state (TLV offsets and lengths, flash addresses, loop state in the analysed configurations) to a remote verifier. The fix rejects any EXPECTED_HASH_TLV whose length is not exactly IMAGE_HASH_SIZE (commit 5098d8ee, PR 2802).

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

Placing the crafted image needs physical/flash-write access (AV:P); impact is a small bounded stack-info leak (C:L) with no integrity or availability effect and no scope change.

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

Primary rating from Vendor (zephyr).

CVSS VectorVendor: zephyr

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

DescriptionCVE.org

boot_save_boot_status() in boot/bootutil/src/boot_record.c reads the image's EXPECTED_HASH_TLV into a stack buffer image_hash[IMAGE_HASH_SIZE] that is never zero-initialised. The TLV handler validates only the upper bound (len > sizeof(image_hash)) and then reads exactly len bytes, so a TLV shorter than IMAGE_HASH_SIZE leaves the tail of image_hash holding stale stack content. The subsequent copy into the boot record, memcpy(buf + offset, image_hash, sizeof(image_hash)), uses the fixed buffer size rather than len, so up to IMAGE_HASH_SIZE - 1 bytes of uninitialised bootloader stack are written into the measured-boot record.

The defect is reachable only under MCUBOOT_MEASURED_BOOT, and only when the image reaching boot_save_boot_status() was not hash-validated on that boot. bootutil_img_validate() rejects a hash TLV whose length is not exactly sizeof(hash) (boot/bootutil/src/image_validate.c:345), and primary-slot validation is on by default (Zephyr's CONFIG_BOOT_VALIDATE_SLOT0 defaults to y), so in a default build the malformed image never reaches this code. The direct-XIP and RAM-load strategies in boot/bootutil/src/loader.c validate the selected slot unconditionally and are not affected. The short TLV survives only where the integrator has turned primary-slot validation off: the swap and overwrite loader built without MCUBOOT_VALIDATE_PRIMARY_SLOT, which checks only the image magic before calling boot_add_shared_data(), and the Zephyr single-slot loader (boot/zephyr/single_loader.c) built without it, including the MCUBOOT_VALIDATE_PRIMARY_SLOT_ONCE variant, which skips validation once the trailer records an earlier successful one. It is also reachable through a time-of-check/time-of-use change to tamperable external flash between validation and the boot-record read. Placing the crafted image requires physical or flash-write access to the device; in a single-slot build with serial recovery enabled, the serial-recovery upload writes the primary slot directly and can place it as well.

In these configurations the boot record's measurement is already not trustworthy: with validation off, the hash copied into the record is the image's own unverified EXPECTED_HASH_TLV, which the attacker chooses. The defect therefore does not weaken attestation integrity any further. What it adds is a path for bootloader memory to leave the device: up to 63 bytes (IMAGE_HASH_SIZE - 1) of uninitialised bootloader stack are embedded in the measurement field that a downstream attestation service sends to a remote verifier. In the configurations analysed the residue is bootloader internal state (TLV offsets and lengths, flash addresses, loop state), not key material, but what occupies that stack region depends on configuration and on which code ran before boot_save_boot_status(). It is reported as a low-severity, defense-in-depth disclosure with no integrity or availability impact.

This is distinct from the already-fixed record_len integer underflow in the same routine (GHSA-8hrv-4cp5-4rg3). The fix rejects any EXPECTED_HASH_TLV whose length is not exactly IMAGE_HASH_SIZE.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Prevalence
Medium
widely-used embedded MCU bootloader, but vulnerable path needs non-default build options
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 LOW
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.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
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact· derived
Low

Priority Score

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

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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