CVE-2026-16668: Unbounded CBOR recursion in MCUboot serial recovery allows pre-authentication stack exhaustion

Published Nov 24, 2026
·
Updated

The vendored zcbor decoder's zcboranyskip() in boot/zcbor/src/zcbordecode.c descends one C-stack frame per level of CBOR nesting. On a list or map it copies the decoder state (memcpy(&statecopy, state, sizeof(zcborstatet))) and recurses once per member, with no depth cap: the skip path does not use zcbor's backup stack, and ZCBORMAXELEMCOUNT is SIZEMAX, 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 zcbormapdecodebulk() (boot/bootserial/src/zcborbulk.c), which skips any map key it does not recognise by calling zcboranyskip() on the encoded value; the echo handler in boot/bootserial/src/bootserial.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 MCUBOOTSERIALMAXRECEIVESIZE = 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 zcborstatet 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 MCUBOOTSERIAL (serial/SMP recovery), which is not enabled by default, and recovery entry is normally gated on a physical pin (CONFIGBOOTSERIALENTRANCEGPIO / PINRESET), 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 zcboranyskip() (or have zcbormapdecodebulk() reject values nested beyond a small constant) and fail once the limit is exceeded — equivalently, take the bounded-skip implementation from upstream zcbor.

Affected Software

2 affected components
MCUboot MCUboot
Nordic Semiconductor zcbor

Event History

Nov 24, 2026
CVE Published
via MITRE·10:39 PM
Data Sourced
via MITRE·10:39 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·11:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed to this issue?

Deployments that enable MCUboot serial recovery and accept attacker-controlled SMP/CBOR requests are exposed. The affected parsing paths run during image upload, before the uploaded image signature is checked.

2

Does exploitation require authentication or a valid signed image?

No. The vulnerable CBOR skip path is reached on attacker-controlled request bytes before authentication, and exploitation occurs before image-signature verification.

3

Are default serial-recovery buffer settings sufficient to carry an exploit payload?

Yes. The default MCUBOOT_SERIAL_MAX_RECEIVE_SIZE is 512 bytes, and a CBOR nesting level can be encoded in one byte, allowing roughly 500 nesting levels in one request.

4

What request content triggers the vulnerable path?

An attacker can supply deeply nested CBOR lists or maps in values associated with unrecognized map keys, causing zcbor_any_skip() to recurse once per nesting level. The echo handler can also invoke the same function directly.

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