CVE-2026-16663 - Pre-authentication out-of-bounds write in MCUboot encrypted serial recovery image decryption

Vulnerability · Reported by NVD · · CWE-787

Severity
High Risk score 84/100
CVSS
8.4 v3.1 · from NVD
Exploit chance (EPSS)
0.4% Higher than 26% of CVEs
Known exploited
No Not in CISA KEV

Summary

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

How this vulnerability can be exploited

This is a out-of-bounds write flaw (CWE-787). An attacker can exploit this vulnerability with local access to the system, without any login, and without any action from a user. Attack complexity is low, so no special conditions are needed. If successful, the attacker could read sensitive data, modify data or code and crash or disrupt the service.

Is it being exploited?

The EPSS model estimates a 0.40% chance this CVE will be exploited in the next 30 days, which is low and higher than 26% of all published CVEs.

Patch priority and what to do

Schedule patching in your next maintenance window, and sooner for internet-facing systems. 1) Check whether you run the affected product and version. 2) Apply the vendor update or patch listed in the advisory. 3) Review logs for signs of exploitation since the publication date.

CVSS vector

CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

See what each part means in the official CVSS calculator ↗

Tags

CVE-2026-16663

Sources & references

How this data is collected: methodology & sources.

Run this software? Get free alerts for new vulnerabilities →

Need to block attackers? Free hourly IOC blocklists (IPs, domains, URLs, hashes) →

Open the live threat dashboard →

Subscribe via RSS.