CVE-2026-16669: Espressif flash-encryption provisioning leaves eFuse key material and plaintext sector buffers on the bootloader stack

Published Nov 24, 2026
·
Updated

MCUboot's Espressif port omits zeroization of two sensitive stack buffers in boot/espressif/hal/src/flashencrypt.c. In checkandgenerateencryptionkeys(), the freshly generated XTS-AES flash-encryption key is held in the stack array keys[BLOCKSNEEDED][32] (flashencrypt.c:216), written to eFuse via espefusewritekeys(), and the function returns (flashencrypt.c:243) without scrubbing it. In espflashencryptregion(), the plaintext flash sector buffer buf (flashencrypt.c:454) retains the last sector's cleartext at both the success and flashfailed returns. Neither path performs a memset/bzero/mbedtlsplatformzeroize, even though the same port already does bzero for key digests in boot/espressif/hal/src/secureboot.c.

The affected code runs only on the Espressif port with CONFIGSECUREFLASHENCENABLED, 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 CONFIGSECUREFLASHENCRYPTIONMODERELEASE 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.

Affected Software

1 affected component
MCUboot MCUboot

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Set CONFIG_SECURE_FLASH_ENCRYPTION_MODE to RELEASE.

    Espressif flash encryption CONFIG_SECURE_FLASH_ENCRYPTION_MODE = RELEASE
  2. Configuration

    Enable secure boot alongside CONFIG_SECURE_FLASH_ENCRYPTION_MODE_RELEASE so the disclosure channels are fused off.

    Espressif port Secure boot = enabled
  3. Compensating control

    Zeroize the stack array `keys[BLOCKS_NEEDED][32]` after writing the key to eFuse, and zeroize `buf` before both the success and `flash_failed` returns in `esp_flash_encrypt_region()`.

Event History

Nov 24, 2026
CVE Published
via MITRE·11:37 PM
Data Sourced
via MITRE·11:37 PM
DescriptionSeverityWeakness
Nov 25, 2026
Data Sourced
via NVD·12:17 AM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed?

Only MCUboot's Espressif port is affected, and only when CONFIG_SECURE_FLASH_ENC_ENABLED is enabled. The code runs during the one-time first-boot provisioning pass before flash encryption has been enabled.

2

What does an attacker need to recover the residual data?

Recovery requires an out-of-band stack or RAM disclosure capability during provisioning, such as a JTAG/debug halt, UART ROM download, core or crash dump, or warm-boot RAM scrape. The residual data includes the generated flash-encryption key material and the last plaintext flash sector buffer.

3

Are devices still exposed after flash-encryption provisioning completes?

On subsequent boots, the relevant buffers are not created. The described exposure is limited to the single provisioning run when flash encryption is not yet enabled.

4

How can I identify whether a device was in the affected condition?

Confirm that it uses the Espressif port with CONFIG_SECURE_FLASH_ENC_ENABLED and determine whether flash-encryption provisioning was taking place or had not yet completed. Captured RAM, debug state, crash dumps, or warm-boot memory from that provisioning window may contain the residual buffers.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203