Read the docs

Unbounded CBOR recursion in MCUboot serial recovery allows pre-authentication stack exhaustion

Priority LOW 13CWE-674Published · Updated

Key facts

Attack vector
Physical
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Denial of service
Confidentiality · integrity · availability
None · None · Low
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA. Impact type from CWE-674.

Summary

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.

Why it matters now

EPSS 0.00612 43rd percentileScored 2026-11-30
Fix Fixed mcuboot (mcu-tools): 2.5.1

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
mcu-toolsmcuboot2.0.0 to before 2.5.12.5.1Patch availableCNA
  • mcuboot Vendormcu-tools Affected 2.0.0 to before 2.5.1 Fixed in 2.5.1 Patch available CNA

Remediation

  • Fix · CNA mcuboot (mcu-tools) Fixed in 2.5.1

Fixed in the same release

Records fixed by the same vendor advisory or release, as the CNA lists them.

  • Release ·

    mcu-tools mcuboot 2.5.1

    2 records Highest priority Priority LOW 2 LOW

    Other records, highest priority first

    • TI-2026-97829 Out-of-bounds stack write in MCUboot encrypted serial recoveryPriority LOW 37

Timeline

  1. 2026-11-24 Threatist record created from CVE-2026-16668
  2. 2026-11-25 Alias added: GHSA-746r-q6q8-7vc7

References

  • 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
See all 15 →

Sources