nday
CVE-2026-16668

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

mcu-tools / mcuboot

Fecha de divulgación: . nday aún no tiene constancia de una corrección; eso no significa que no exista parche. Ninguna de las cuatro fuentes de PoC la recoge. No figura en el KEV de CISA.

why these tags

nday derives these tags by fixed rules from the facts below; NVD, the CNA and other sources do not assign them. Vocabulary and rules: ~/tags.

resource exhaustion
CWE-674, stated by the CNA zephyr
physical
AV:P in CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L (CVSS 3.1) from the CNA zephyr
no authentication required
PR:N in CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L (CVSS 3.1) from the CNA zephyr
no user interaction
UI:N in CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L (CVSS 3.1) from the CNA zephyr
etapa
DIS
divulgación
cvss
2.4 LOW v3.1

Ciclo de vida

Eje x en UTC; punto = minuto exacto, barra ancha = solo fecha, hueco = desconocida o inferida.
fecha desconocida
DISdivulgada
11-24T22:39Z
PATparcheada
sin registro aún
ANAanalizada
sin registro aún
POCPoC
sin registro aún
ITWexplotada
sin registro aún
KEVen KEV
sin registro aún

Descripción

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.

Original text of the CVE record (cvelist), shown as published.

Exploit conditions

What an attack needs, read from the CVSS vector.
Attack vector AV:P
Physical: needs physical access to the device
Attack complexity AC:L
Low: no special conditions; the attacker can expect repeatable success
Privileges required PR:N
None: no account or authorization needed
User interaction UI:N
None: no action by anyone other than the attacker

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

CVSS 3.1 vector from the CVE record, scored by the CNA zephyr.

Registro de eventos

+DISdivulgación

zephyr publicó el registro CVE. CVSS 2.4, severidad baja.

fuente cvelist · nday , observado en tiempo real · en bruto
{
  "id": 547820,
  "type": "disclosed",
  "source": "cvelist",
  "url": "https://www.cve.org/CVERecord?id=CVE-2026-16668",
  "occurred_at": "2026-11-24T22:39:47.978Z",
  "observed_at": "2026-11-24T23:03:12.570299Z",
  "is_backfill": false,
  "dedupe_key": "",
  "detail": {
    "cvss": {
      "source": "cna",
      "vector": "CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L",
      "version": "3.1",
      "base_score": 2.4,
      "base_severity": "LOW"
    },
    "state": "PUBLISHED",
    "date_published": "2026-11-24T22:39:47.978Z",
    "assigner_short_name": "zephyr"
  }
}

Report an error

report an error or omission

Something on this page wrong or missing? Tell the editors; if they accept it, this page's revision log says so publicly. Upstream data is not changed.

Debate de investigadores

0 investigadores lo mencionaron en los últimos 7 días

Publicaciones en X de investigadores de la lista de nday que mencionan este CVE, tal como se publicaron. nday no las verifica.

nday aún no ha recopilado publicaciones en X de investigadores de su lista sobre este CVE.

Discussion

0 comments

No comments yet.