CVE-2026-16668
Unbounded CBOR recursion in MCUboot serial recovery allows pre-authentication stack exhaustion
Mitigation
- Upgrade mcuboot to 2.5.1 or later.
Who should check
- Anyone running mcu-tools mcuboot >= 2.0.0, < 2.5.1
Vulnerability facts
- Affected
- mcu-tools mcuboot >= 2.0.0, < 2.5.1
- Fixed in
- mcu-tools mcuboot 2.5.1
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 2.4 (v3.1, CNA)CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Physical
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: Low
- EPSS
- 0.61% chance of exploitation in 30 days (percentile 44, 2026-11-28)
- CWE
- CWE-674
- Modified
Description
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| mcu-tools mcuboot | >= 2.0.0, < 2.5.1 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-16668. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-16668.md Affected: mcu-tools mcuboot >= 2.0.0, < 2.5.1 Fixed in: mcu-tools mcuboot 2.5.1 Steps: 1. Search this machine and project for mcu-tools mcuboot: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
FAQ
Is CVE-2026-16668 being exploited?
There is no confirmed exploitation: CVE-2026-16668 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.61% chance of exploitation in the next 30 days (as of 2026-11-28).
How serious is CVE-2026-16668?
Low: CVSS 2.4 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2026-16668?
mcu-tools mcuboot >= 2.0.0, < 2.5.1.
Is there a fix for CVE-2026-16668?
Yes. Fixed in mcu-tools mcuboot 2.5.1. Upgrade mcuboot to 2.5.1 or later.
How do I check if I'm affected by CVE-2026-16668?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.
More mcu-tools vulnerabilities
See all| Severity | Identifier / vulnerability | Technology | Signals | Age |
|---|---|---|---|---|
| MEDIUM 4.0 | CVE-2026-16670 Out-of-bounds read in the PSA ECDSA signature DER parser on a malformed signature TLV before verification | mcu-tools | EPSS 5% | |
| LOW 2.0 | CVE-2026-16669 Espressif flash-encryption provisioning leaves eFuse key material and plaintext sector buffers on the bootloader stack | mcu-tools | EPSS 2% | |
| MEDIUM 6.2 | CVE-2026-16667 Cypress/PSoC6 flash backend fails to bounds-check flash accesses, allowing pre-auth out-of-bounds reads | mcu-tools | EPSS 14% | |
| MEDIUM 5.7 | CVE-2026-16666 MCUboot swap resume trusts a flash-resident swap_size, allowing pre-authentication out-of-bounds flash operations | mcu-tools | EPSS 6% | |
| HIGH 7.4 | CVE-2026-16665 MCUboot 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 state | mcu-tools | EPSS 40% |