CVE-2026-16668: fallo de gravedad baja en mcu-tools mcuboot
Unbounded CBOR recursion in MCUboot serial recovery allows pre-authentication stack exhaustion
Publicada el · Actualizada el
Aviso por correo cuando entre en el KEV, tenga PoC pública o suba de nota.
28Vexday Risk Score
Sin señal de explotación. Ella tiene prueba de concepto pública.
ssvc Attendcvss 2.4epss 0.6%
de la publicación al arma1 día
Publicada en NVD24 nov
1ª PoC+1d
The vendored zcbor decoder's zcbor_any_skip() in boot/zcbor/src/zcbor_decode.c descends one C-stack frame per level of CBOR nesting. On a list or map it copies the decoder state (memcpy(&state_copy, state, sizeof(zcbor_state_t))) and recurses once per member, with no depth cap: the skip path does not use zcbor's backup stack, and ZCBOR_MAX_ELEM_COUNT is SIZE_MAX, so nothing bounds how deep the recursion goes.
That function is reached on attacker-controlled bytes before any authentication. MCUboot's serial-recovery command parser decodes SMP/CBOR requests with zcbor_map_decode_bulk() (boot/boot_serial/src/zcbor_bulk.c), which skips any map key it does not recognise by calling zcbor_any_skip() on the encoded value; the echo handler in boot/boot_serial/src/boot_serial.c calls it directly on the same footing. Both run during image upload, long before the uploaded image's signature is checked. The default receive buffer is MCUBOOT_SERIAL_MAX_RECEIVE_SIZE = 512 bytes and each nesting level costs a single byte to encode (0x81), so roughly 500 levels of nesting fit in one request — comfortably more than a bootloader's stack can absorb, since every frame carries a full zcbor_state_t copy plus locals.
The impact is availability only: the bootloader's stack overflows and the device faults or hangs during recovery. There is no controlled out-of-bounds write that escapes the DFU buffer, no disclosure, and no authentication bypass — the recursion grows the stack with the decoder's own internal state. Whether a given board actually exhausts its stack depends on that board's bootloader stack size, which we did not measure; the fix is nevertheless unconditional, because an unauthenticated pre-authentication code path must not have its safety depend on a per-board stack margin.
Exposure requires MCUBOOT_SERIAL (serial/SMP recovery), which is not enabled by default, and recovery entry is normally gated on a physical pin (CONFIG_BOOT_SERIAL_ENTRANCE_GPIO / PIN_RESET), with a no-valid-image fallback path. Products that expose serial recovery over an externally reachable transport, or that fall into recovery when no valid image is present, are the ones at risk.
The fix is to bound the skip: thread a recursion-depth counter through zcbor_any_skip() (or have zcbor_map_decode_bulk() reject values nested beyond a small constant) and fail once the limit is exceeded — equivalently, take the bounded-skip implementation from upstream zcbor.
CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Productos afectados
mcu-tools · mcubootPoCs públicas encontradas — 1
githubgithub.com/googlesky/CVE-2026-16668★ 0⚠ Recursos públicos, para evaluar la exposición de sistemas que controlas o estás autorizado a probar. Prueba solo con autorización.
CVEs relacionadas — mcu-tools mcuboot
En el mismo producto, de las más peligrosas a las menos.
CVE-2026-16665HIGHMCUboot uses assert() as a security guard on the boot/swap/validation path; under NDEBUG (release builds) these checks are compiled out, so an inconsistent/attacker-influenced swap status is not aborted and the swap completes on bad stateEPSS 0.6%CVE-2026-16663HIGHPre-authentication out-of-bounds write in MCUboot encrypted serial recovery image decryptionEPSS 0.4%CVE-2026-16667MEDIUMCypress/PSoC6 flash backend fails to bounds-check flash accesses, allowing pre-auth out-of-bounds readsEPSS 0.3%CVE-2026-16666MEDIUMMCUboot swap resume trusts a flash-resident swap_size, allowing pre-authentication out-of-bounds flash operationsEPSS 0.2%CVE-2026-16670MEDIUMOut-of-bounds read in the PSA ECDSA signature DER parser on a malformed signature TLV before verificationEPSS 0.2%CVE-2026-127915LOWTLV iterator does not bound each entry against the declared TLV area in MCUboot bootutilEPSS 0.2%