nday
CVE-2026-16663

Pre-authentication out-of-bounds write in MCUboot encrypted serial recovery image decryption

mcu-tools / mcuboot

公開から 1 日後に PoC が確認されています。nday はまだ修正の根拠を取得していません。修正がないという意味ではありません。PoC ソース 4 件中 1 件(github)に掲載されています。CISA KEV には現時点で未掲載です。

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.

buffer overflow / out-of-bounds write
CWE-787, stated by the CNA zephyr、NVD, republishing [email protected]
local
AV:L in CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (CVSS 3.1) from the CNA zephyr
no authentication required
PR:N in CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (CVSS 3.1) from the CNA zephyr
no user interaction
UI:N in CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (CVSS 3.1) from the CNA zephyr
現在の段階
POC
公開日時
公開から PoC まで
T+1d POC は日付のみ
CVSS 基本値
8.4 HIGH v3.1

ライフサイクル

横軸は UTC。点=分単位、幅広の帯=日付のみ、白抜き=不明または推定。
日時不明
DIS公開
11-24T21:39Z
PAT修正
記録なし
ANA解析
記録なし
POCPoC
11-25 日付のみ
ITW悪用
記録なし
KEVKEV
記録なし

概要

MCUboot's encrypted serial-recovery path contains an attacker-controlled out-of-bounds stack write in decrypt_region_inplace() in boot/boot_serial/src/boot_serial_encryption.c. The routine decrypts an uploaded encrypted image one flash sector at a time into a sector-sized stack VLA buf[sz], but when the current sector is still inside the image header it sets the destination index to the absolute header size (idx = hdr->ih_hdr_size; at boot/boot_serial/src/boot_serial_encryption.c:156) and then decrypts into &buf[idx]. The correct sibling routine boot/bootutil/src/loader.c:876 uses the sector-relative idx = hdr->ih_hdr_size - abs_off; the serial path is missing the - abs_off term, so for any sector after the first the index runs past the end of the stack buffer.

The ih_hdr_size field is a uint16_t taken verbatim from the uploaded image header. On the second sector onward, when ih_hdr_size exceeds the sector size, &buf[idx] points beyond buf and boot_enc_decrypt() writes attacker-controlled plaintext into adjacent stack frames. The path is reached pre-authentication: bs_upload() calls boot_handle_enc_fw() (boot/boot_serial/src/boot_serial.c:1208) after upload, and the pre-decryption signature gate in decrypt_image_inplace() is compiled out (#if 0 at boot/boot_serial/src/boot_serial_encryption.c:226-233), so the header is never validated before decryption.

A second error in the same window computation affects the first sector. When a sector holds both the end of the header and the start of the TLV area, the decrypt length is clamped to tlv_off - (off + bytes_copied), measured from the start of the sector rather than from idx (boot/boot_serial/src/boot_serial_encryption.c:166). An encrypted image whose header and payload end within the first sector is therefore decrypted for ih_hdr_size bytes more than it should be: into the TLV area and, when the image ends near the end of the sector, past buf. This form needs no oversized header, so even an ordinary small encrypted image can trigger it, and it reaches devices with sectors of up to about 128 KiB rather than only those whose sector is smaller than the 16-bit ih_hdr_size.

Reaching the sink requires a build with MCUBOOT_ENC_IMAGES and serial recovery enabled, and access to the device's serial/USB recovery interface (unauthenticated by design). With the public-key encryption schemes the AES content key is wrapped to the device's public encryption key, so an attacker can author a fully crafted encrypted image — including a malicious ih_hdr_size — without the image-signing private key. The result is a controllable stack memory-corruption inside the bootloader before any signature check, providing a path to code execution in the secure-boot root of trust that bypasses image authentication, as well as a denial-of-service. A 2048-byte out-of-bounds write was reproduced under AddressSanitizer (sz=4096, off=4096, ih_hdr_size=6144).

On releases before v2.0.0 (v1.9.0 and v1.10.0) the destination is a file-scope static uint8_t buf[SOC_FLASH_ERASE_BLK_SZ] in .bss rather than the stack VLA described above — the code then lived in boot/zephyr/single_loader.c, before commit c9fa6088 relocated it to boot/boot_serial/src/boot_serial_encryption.c and changed the buffer's storage class. The out-of-bounds write is equally real and equally pre-authentication on those releases, but it corrupts adjacent static data rather than the stack, so a stack-smashing proof of concept written against a current release will not reproduce as-is there.

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

Exploit conditions

What an attack needs, read from the CVSS vector.
Attack vector AV:L
Local: needs a local or SSH session, or a user tricked into acting on the machine
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:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

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

イベント履歴

+DIS公開

zephyr が CVE レコードを公開。CVSS 基本値 8.4(重要)。

出典 cvelist · nday が にリアルタイムで観測 · 生データ
{
  "id": 547818,
  "type": "disclosed",
  "source": "cvelist",
  "url": "https://www.cve.org/CVERecord?id=CVE-2026-16663",
  "occurred_at": "2026-11-24T21:39:10.848Z",
  "observed_at": "2026-11-24T23:03:12.570299Z",
  "is_backfill": false,
  "dedupe_key": "",
  "detail": {
    "cvss": {
      "source": "cna",
      "vector": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "version": "3.1",
      "base_score": 8.4,
      "base_severity": "HIGH"
    },
    "state": "PUBLISHED",
    "date_published": "2026-11-24T21:39:10.848Z",
    "assigner_short_name": "zephyr"
  }
}
2026-11-25日付のみ、ソース記載
+POCPoC 公開

GitHub の PoC リポジトリ:googlesky/CVE-2026-16663。日付はリポジトリの作成日。

出典 github 1471048382 · nday が にリアルタイムで観測 · 生データ
{
  "id": 548031,
  "type": "poc_published",
  "source": "github",
  "url": "https://github.com/googlesky/CVE-2026-16663",
  "occurred_at": "2026-11-25T01:00:51Z",
  "observed_at": "2026-11-25T00:00:00Z",
  "is_backfill": false,
  "dedupe_key": "1471048382",
  "detail": {
    "url": "https://github.com/googlesky/CVE-2026-16663",
    "title": "googlesky/CVE-2026-16663",
    "precision": "day"
  }
}

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.

研究者の投稿

過去 7 日間に 0 人の研究者が言及

リストの研究者が X でこの CVE に触れた投稿です。原文のまま表示し、nday は検証していません。

リストの研究者が X でこの CVE に触れた投稿は、まだ収集していません。

Discussion

0 comments

No comments yet.