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

- **Severity:** LOW 2.4
- **CVSS:** 2.4 (v3.1, CNA) `CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.61% (percentile 44, 2026-11-28)
- **CWE:** CWE-674
- **Published:** 2026-11-24T22:39:47.978Z
- **Modified:** 2026-11-24T23:17:32.420Z

## Who should check

- Anyone running mcu-tools mcuboot \>= 2.0.0, \< 2.5.1

## 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

- mcu-tools mcuboot: \>= 2.0.0, \< 2.5.1 (cvelist)

## Mitigation

- Upgrade mcuboot to 2.5.1 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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.

## References

- vendor: <https://github.com/mcu-tools/mcuboot/security/advisories/GHSA-jchr-4hhc-j9gj>
- patch: <https://github.com/mcu-tools/mcuboot/commit/1b9d870bad5ee45419824fe038ada8901d873749>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-16668>
- FIRST EPSS: EPSS scores by FIRST <https://www.first.org/epss/>

HTML: <https://flawdb.com/CVE-2026-16668> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-16668>
