CVE-2026-16668
Unbounded CBOR recursion in MCUboot serial recovery allows pre-authentication stack exhaustion
Check your servers for CVE-2026-16668
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-16668 affects mcuboot, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Severity (CVSS)
CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- Attack vector
- physical: the attacker has to touch the device
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality none, integrity none, availability low: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.61%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 43.5% of all scored CVEs. Scores of 30 Nov 2026.
Weakness
- CWE-674 Uncontrolled Recursion
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
|
mcuboot
package
mcuboot |
affected from 2.0.0, before 2.5.1
Other versions: unaffected
|
Is my server affected?
Find the installed version of mcuboot and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i mcuboot
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2026-16668 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2026-16668RHEL, Rocky, Alma, Fedora
rpm -q mcuboot
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2026-16668Alpine
apk list --installed | grep -i mcubootWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-16668
trivy image --scanners vuln IMAGE | grep CVE-2026-16668
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Patches and release notes
- Fix commit github.com · patch
Other references
- GHSA-jchr-4hhc-j9gj github.com
Source: the record CVE-2026-16668 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse