# CVE-2026-127916: MCUboot image hash span is not bounded against the slot, allowing a read past the flash area during image validation

- **Severity:** LOW 2.9
- **CVSS:** 2.9 (v3.1, CNA) `CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: Low
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.15% (percentile 2, 2026-11-28)
- **CWE:** CWE-125
- **Published:** 2026-11-13T00:23:09.233Z
- **Modified:** 2026-11-24T23:13:21.133Z

## Who should check

- Anyone running mcu-tools mcuboot \>= 1.6.0, \< 2.5.0

## Description

bootutil\_img\_hash() computes the image digest over ih\_hdr\_size + ih\_img\_size + ih\_protect\_tlv\_size bytes, all three taken from the candidate image's header, and reads that span out of the slot without checking that it fits in the flash area. The three sizes are also summed without an overflow check. Nothing earlier on the validation path bounds the whole span either: bootutil\_img\_validate() compares the image size against bootutil\_max\_image\_size() only after the hash has been computed.

The callers bound part of the span, or none of it:

On the swap and overwrite upgrade path, boot\_validate\_slot() first runs the image header check (boot\_is\_header\_valid(), later boot\_check\_header\_valid()). Before MCUboot 2.2.0 that check covered only ih\_hdr\_size + ih\_img\_size, so for every image the protected-TLV area (ih\_protect\_tlv\_size, a uint16\_t, up to 65535 bytes) was hashed without being bounded. From 2.2.0 the check includes ih\_protect\_tlv\_size, except for a compressed image in the secondary slot when MCUBOOT\_DECOMPRESS\_IMAGES (CONFIG\_BOOT\_DECOMPRESSION) is enabled, which leaves the same gap of up to 64 KB.
Zephyr's single-slot and firmware loaders (boot/zephyr/single\_loader.c, boot/zephyr/firmware\_loader.c) read the header with boot\_image\_load\_header(), which bounds ih\_hdr\_size + ih\_img\_size against the flash area. Before MCUboot 2.4.0 that bound did not include ih\_protect\_tlv\_size, which leaves the same gap of up to 64 KB. From 2.4.0 these loaders bound the whole span.
The serial recovery image-list and image-state handlers (bs\_list() and bs\_set() in boot/boot\_serial/src/boot\_serial.c) call bootutil\_img\_validate() with no header check at all, so on those paths ih\_img\_size is unbounded as well.

The image is hashed before its signature is checked, so anyone who can place an image in a slot (an OTA or SMP update delivered through the application, or serial recovery) reaches this read before authentication.

Whether a malformed header produces an actual read beyond the area depends on the flash backend:

Backends whose flash\_area\_read() bounds-checks the request (Zephyr, Espressif, NuttX, Mbed) return an error once the chunked read crosses the end of the area. Validation fails and the image is rejected, with no over-read.
With MCUBOOT\_HASH\_STORAGE\_DIRECTLY (Zephyr CONFIG\_BOOT\_IMG\_HASH\_DIRECTLY\_ON\_STORAGE, available from 2.2.0, not enabled by default) the span is hashed through a single direct pointer into memory-mapped flash, with no bounds check.
The Cypress PSoC6 port's flash\_area\_read() (boot/cypress/cy\_flash\_pal/cy\_flash\_map.c, from 1.6.0) does not bound the read: its assert()s compare against the area's absolute offset rather than its size, and it copies with memcpy().

The bytes read past the area feed only the digest, which is compared internally and never returned, so nothing is disclosed. The realistic effect is a read fault during image validation: up to 64 KB past the slot on the upgrade path and, before 2.4.0, on the Zephyr loaders, and potentially much further on the serial recovery handlers, which skip the header check. Where validation is repeated at every boot (a pending upgrade, or, before 2.4.0, the single-slot loader checking its image), the fault can recur on each reset and keep the device from booting.

The fix makes bootutil\_img\_hash() add the three sizes with boot\_u32\_safe\_add() and reject an image whose span, including the sector offset used in swap-using-offset mode, does not fit in the flash area, before any of it is hashed. Because the bound is applied where the bytes are read, it covers every caller.

## Affected and fixed versions

- mcu-tools mcuboot: \>= 1.6.0, \< 2.5.0 (cvelist)

## Mitigation

- Upgrade mcuboot to 2.5.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-127916. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-127916.md
Affected: mcu-tools mcuboot >= 1.6.0, < 2.5.0
Fixed in: mcu-tools mcuboot 2.5.0

Steps:
1. Search this machine and project for mcu-tools mcuboot: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-127916 being exploited?

There is no confirmed exploitation: CVE-2026-127916 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.15% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-127916?

Low: CVSS 2.9 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2026-127916?

mcu-tools mcuboot \>= 1.6.0, \< 2.5.0.

### Is there a fix for CVE-2026-127916?

Yes. Fixed in mcu-tools mcuboot 2.5.0. Upgrade mcuboot to 2.5.0 or later.

### How do I check if I'm affected by CVE-2026-127916?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/mcu-tools/mcuboot/security/advisories/GHSA-c7cx-5pqv-x9m6>
- patch: <https://github.com/mcu-tools/mcuboot/commit/e9abe4f0292f0ed72391e146e098e22547b2d78b>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-127916>
- FIRST EPSS: EPSS scores by FIRST <https://www.first.org/epss/>

HTML: <https://flawdb.com/CVE-2026-127916> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-127916>
