Espressif MCUboot leaves flash encryption key in stack memory
Key facts
- Attack vector
- Physical
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Impact type
- —
- Confidentiality · integrity · availability
- Low · None · None
- Fix status
- No fix listed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA.
Summary
MCUboot's Espressif port from 1.9.0 does not clear sensitive stack buffers during flash-encryption provisioning, which is CWE-226. A flash-encryption key and the last plaintext flash sector can remain in bootloader stack memory after the one-time first boot. An attacker needs a memory disclosure channel such as JTAG debug access, UART ROM download or a crash dump, captured during that single boot.
Written with Claude Haiku 5.5 from the sources below · 2026-11-25
Description from the CNA
MCUboot's Espressif port omits zeroization of two sensitive stack buffers in boot/espressif/hal/src/flash_encrypt.c. In check_and_generate_encryption_keys(), the freshly generated XTS-AES flash-encryption key is held in the stack array keys[BLOCKS_NEEDED][32] (flash_encrypt.c:216), written to eFuse via esp_efuse_write_keys(), and the function returns (flash_encrypt.c:243) without scrubbing it. In esp_flash_encrypt_region(), the plaintext flash sector buffer buf (flash_encrypt.c:454) retains the last sector's cleartext at both the success and flash_failed returns. Neither path performs a memset/bzero/mbedtls_platform_zeroize, even though the same port already does bzero for key digests in boot/espressif/hal/src/secure_boot.c. The affected code runs only on the Espressif port with CONFIG_SECURE_FLASH_ENC_ENABLED, and only during the one-time first-boot provisioning pass when flash encryption is not yet enabled (boot/espressif/main.c); on subsequent boots the buffers are never created. Recovering the residue requires an out-of-band stack/RAM-disclosure primitive — JTAG/debug halt, UART ROM download, a core/crash dump, or a warm-boot RAM scrape — captured during that single provisioning boot. Under the recommended CONFIG_SECURE_FLASH_ENCRYPTION_MODE_RELEASE plus secure boot, those channels are fused off and no exposure exists. The practical impact is a low-severity, defense-in-depth hardening gap: a flash-encryption key (and last plaintext sector) may linger in bootloader stack memory. Because the eFuse key block is burned read+write-protected, the transient stack copy is the only readable copy, and only during one boot; in a development build where a disclosure channel is open, an attacker with that capability can usually already read the still-plaintext flash directly, so the marginal confidentiality gain is small. Confirming real-world recovery depends on a specific SoC/debug configuration not exercisable from source alone.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
The sources list no fixed version for MCUboot. The source description says that the recommended CONFIG_SECURE_FLASH_ENCRYPTION_MODE_RELEASE setting with secure boot fuses off those disclosure channels.
Written with Claude Haiku 5.5 from the sources below · 2026-11-25
Timeline
- 2026-11-24 Threatist record created from CVE-2026-16669
- 2026-11-25 Alias added: GHSA-jmj8-qqvq-jhqq
- 2026-11-25 CISA SSVC decision points changed
References
Other 1
More mcu-tools vulnerabilities
- TI-2026-97829 Out-of-bounds stack write in MCUboot encrypted serial recovery CVSS 3.1HIGH 8.4
- TI-2026-97830 MCUboot release builds compile out its assert() security checks CVSS 3.1HIGH 7.4
- TI-2024-21755 MCUboot Injection attack of unprotected TLV values CVSS 3.1HIGH 7.7
- TI-2026-97923 Out-of-bounds flash reads in MCUboot Cypress/PSoC6 backend CVSS 3.1MEDIUM 6.2
- TI-2026-97922 Out-of-bounds flash access via forged swap status in MCUboot CVSS 3.1MEDIUM 5.7
- TI-2026-91073 Out-of-bounds read in MCUboot serial recovery image index CVSS 3.1MEDIUM 5.1
Sources
- CVE-2026-16669 · CVE Program
- CVE-2026-16669 · NVD
- FIRST EPSS
- GHSA-jmj8-qqvq-jhqq · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences