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

Vulnerability · Reported by NVD · · CWE-674

Severity
Low Risk score 24/100
CVSS
2.4 v3.1 · from NVD
Exploit chance (EPSS)
0.61% Higher than 44% of CVEs
Known exploited
No Not in CISA KEV

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

How this vulnerability can be exploited

An attacker can exploit this vulnerability with physical access to the device, without any login, and without any action from a user. Attack complexity is low, so no special conditions are needed.

Is it being exploited?

The EPSS model estimates a 0.61% chance this CVE will be exploited in the next 30 days, which is low and higher than 44% of all published CVEs.

Patch priority and what to do

Patch during routine updates. Lower severity, but keep it on your list. 1) Check whether you run the affected product and version. 2) Apply the vendor update or patch listed in the advisory. 3) Review logs for signs of exploitation since the publication date.

CVSS vector

CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

See what each part means in the official CVSS calculator ↗

Tags

CVE-2026-16668

Sources & references

How this data is collected: methodology & sources.

Run this software? Get free alerts for new vulnerabilities →

Need to block attackers? Free hourly IOC blocklists (IPs, domains, URLs, hashes) →

Open the live threat dashboard →

Subscribe via RSS.