CVE-2026-16665 (GCVE-0-2026-16665)
Vulnerability from cvelistv5 – Published: 2026-11-24 21:39 – Updated: 2026-11-24 21:39- CWE-754 - Security-critical invariant enforced only by assert(), compiled out under NDEBUG (fail-open on error/inconsistent state)
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://github.com/mcu-tools/mcuboot",
"defaultStatus": "unaffected",
"packageName": "mcuboot",
"product": "mcuboot",
"vendor": "mcu-tools",
"versions": [
{
"lessThanOrEqual": "*",
"status": "affected",
"version": "1.1.0",
"versionType": "semver"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "Summary\n\nMCUboot enforces several security-critical invariants on the boot, image-swap, and validation paths using assert(). In a standard release/production build (NDEBUG defined) assert() expands to a no-op, so an invariant the code intends to halt on instead falls through, and execution continues with the bad or inconsistent state. Where the guarded condition is attacker-influenceable through the flash-write boundary (serial-recovery / DFU), this is a security check that is simply absent in release builds.\n\nThis is one root cause (assert-as-security-guard, no-op under NDEBUG) with one fix approach (replace the security-critical asserts with real fail-closed checks), so it is filed as a single advisory covering the enumerated sites.\n\nWorst reachable instance \u2014 inconsistent swap status completes the swap without validation\n\nIn the swap-resume status read, an inconsistent status (erased_sections \u003e 1) is detected, logged, and \u2014 when MCUBOOT_VALIDATE_PRIMARY_SLOT is disabled \u2014 is meant to abort, because \"there is no way to be sure the swapped primary slot is OK.\" The abort is assert(0):\n\nboot/bootutil/src/swap_move.c:181-194 \u2014 if (erased_sections \u003e 1) { ... #if !defined(MCUBOOT_VALIDATE_PRIMARY_SLOT) / ... abort! / assert(0); #endif }, then execution falls through to compute bs-\u003eop/idx/state from the inconsistent status (lines 197-208) and return 0 (success).\nboot/bootutil/src/swap_offset.c:266-280 \u2014 identical pattern; falls through to bs-\u003eop/idx/state and return 0.\nboot/bootutil/src/swap_scratch.c:227-241 \u2014 same invalid/assert(0) pattern for the scratch backend.\n\nUnder NDEBUG with primary-slot validation off, the inconsistent status is neither aborted (assert is a no-op) nor re-validated (validation off), so boot_complete_partial_swap() finishes the swap on inconsistent metadata and the primary slot is booted without a signature check. An attacker who can write the swap-status trailer can craft the inconsistent status.\n\nReachability (threat model). Secondary slot + scratch trailers are A2-writable by definition (that is what a DFU upload is). Under MCUBOOT_SERIAL_RECOVERY the primary trailer is A2-writable too: boot/boot_serial/src/boot_serial.c:978 opens flash_area_id_from_multi_image_slot(img_num, 0) (== primary) and writes from offset 0 bounded by area_size, so it can paint the primary swap-status/magic. This is how the A2 (recovery/DFU, unauthenticated by design) attacker influences the guarded condition. Property violated: P1 (image authenticity / secure-boot bypass) when un-revalidated content is booted, and P6 (boot/recovery availability).\n\nSecond reachable instance \u2014 resume-path swap_size from an unguarded trailer\n\nboot/bootutil/src/loader.c:1190-1193: the swap resume branch does fap = boot_find_status(...); assert(fap != NULL); rc = boot_read_swap_size(fap, \u0026bs-\u003eswap_size); assert(rc == 0);. boot_find_status() (boot/bootutil/src/bootutil_misc.c:166-204) searches {scratch, primary} and, on no-valid-magic-match, returns the last-iterated area (primary), not NULL \u2014 so assert(fap != NULL) cannot fire even in debug, and under NDEBUG neither assert fires. swap_size is then read from an A2-writable (serial-recovery primary, or scratch) trailer with no fail-closed handling. This is the same swap-metadata-trust family as the recorded resume/swap_size disclosure.\n\nReachable-security sites (center the fix here)\n\n1. boot/bootutil/src/swap_move.c:193 \u2014 inconsistent-status assert(0), falls through to complete swap. A2 + !VALIDATE_PRIMARY. [worst]\n2. boot/bootutil/src/swap_offset.c:278 \u2014 same, swap-offset backend.\n3. boot/bootutil/src/swap_scratch.c:239 \u2014 same, swap-scratch backend.\n4. boot/bootutil/src/loader.c:1191 and :1193 \u2014 resume assert(fap != NULL) / assert(rc == 0) guarding swap_size read from an A2-writable trailer; compounded by boot_find_status() never returning NULL.\n\n(Truncated. The full description is in the advisory: https://github.com/mcu-tools/mcuboot/security/advisories/GHSA-cr9j-p626-pwcc)"
}
],
"metrics": [
{
"cvssV3_1": {
"baseScore": 7.4,
"baseSeverity": "HIGH",
"vectorString": "CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
"version": "3.1"
},
"format": "CVSS"
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-754",
"description": "Security-critical invariant enforced only by assert(), compiled out under NDEBUG (fail-open on error/inconsistent state)",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-11-24T21:39:12.111Z",
"orgId": "e2e69745-5e70-4e92-8431-deb5529a81ad",
"shortName": "zephyr"
},
"references": [
{
"name": "Fix commit 36e56d691f4e",
"tags": [
"patch"
],
"url": "https://github.com/mcu-tools/mcuboot/commit/36e56d691f4e853f2f741309751b9611689f4197"
},
{
"name": "Fix commit 43dc9d0d9765",
"tags": [
"patch"
],
"url": "https://github.com/mcu-tools/mcuboot/commit/43dc9d0d97656f1c08b2ffef2f0a3c1db62cba7e"
},
{
"name": "Fix commit e0872142b9d7",
"tags": [
"patch"
],
"url": "https://github.com/mcu-tools/mcuboot/commit/e0872142b9d734c116b0ed7b35657dc933c3888b"
},
{
"name": "Fix commit e52ced626dd0",
"tags": [
"patch"
],
"url": "https://github.com/mcu-tools/mcuboot/commit/e52ced626dd0391a0b7f175adf84b748b8db8795"
},
{
"name": "Fix commit 3b9159e1e04c",
"tags": [
"patch"
],
"url": "https://github.com/mcu-tools/mcuboot/commit/3b9159e1e04c6a09c691bdf9140bf303e3718c68"
},
{
"name": "Fix commit 2d74b30860ac",
"tags": [
"patch"
],
"url": "https://github.com/mcu-tools/mcuboot/commit/2d74b30860ac97f764367f3a66dc3b274a672244"
},
{
"name": "Fix commit 133148bd5d79",
"tags": [
"patch"
],
"url": "https://github.com/mcu-tools/mcuboot/commit/133148bd5d792f781b72b8fce933ab9117780978"
},
{
"name": "Fix commit 442c86b2131c",
"tags": [
"patch"
],
"url": "https://github.com/mcu-tools/mcuboot/commit/442c86b2131c119aab06ad4dde18ec62954d2808"
},
{
"name": "Fix commit 9365411227c7",
"tags": [
"patch"
],
"url": "https://github.com/mcu-tools/mcuboot/commit/9365411227c79a944ee72407e51a07320489e424"
},
{
"name": "Fix commit 8e8ce11487c8",
"tags": [
"patch"
],
"url": "https://github.com/mcu-tools/mcuboot/commit/8e8ce11487c83975755b6ddcad69f4f42ee28977"
},
{
"name": "Fix commit 18c4f19e2e0e",
"tags": [
"patch"
],
"url": "https://github.com/mcu-tools/mcuboot/commit/18c4f19e2e0e457b86bd37274a2fef4c3e6d2850"
},
{
"name": "Fix commit ec006b882ce6",
"tags": [
"patch"
],
"url": "https://github.com/mcu-tools/mcuboot/commit/ec006b882ce618e01e7bbddcb2e5e12cb6987e0a"
},
{
"name": "Fix commit 4d9424a747de",
"tags": [
"patch"
],
"url": "https://github.com/mcu-tools/mcuboot/commit/4d9424a747de9c5e74be601aebee5239e371e21c"
},
{
"name": "Fix commit adc0e42effb9",
"tags": [
"patch"
],
"url": "https://github.com/mcu-tools/mcuboot/commit/adc0e42effb9422659c9d2d63399cdce1f297648"
},
{
"name": "Fix commit b0047116aa2a",
"tags": [
"patch"
],
"url": "https://github.com/mcu-tools/mcuboot/commit/b0047116aa2a2cfb18f3f1bc2bd286217bc22e5c"
},
{
"name": "Fix commit ab3fd3d4d563",
"tags": [
"patch"
],
"url": "https://github.com/mcu-tools/mcuboot/commit/ab3fd3d4d563e57303fd0720bc0f0a93f5c619d0"
},
{
"name": "Remaining fix: pull request #3012",
"url": "https://github.com/mcu-tools/mcuboot/pull/3012"
},
{
"name": "GHSA-cr9j-p626-pwcc",
"url": "https://github.com/mcu-tools/mcuboot/security/advisories/GHSA-cr9j-p626-pwcc"
}
],
"title": "MCUboot uses assert() as a security guard on the boot/swap/validation path; under NDEBUG (release builds) these checks are compiled out, so an inconsistent/attacker-influenced swap status is not aborted and the swap completes on bad state",
"x_generator": {
"engine": "cvelib 1.8.0"
}
}
},
"cveMetadata": {
"assignerOrgId": "e2e69745-5e70-4e92-8431-deb5529a81ad",
"assignerShortName": "zephyr",
"cveId": "CVE-2026-16665",
"datePublished": "2026-11-24T21:39:12.111Z",
"dateReserved": "2026-07-22T19:47:56.185Z",
"dateUpdated": "2026-11-24T21:39:12.111Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2",
"vulnerability-lookup:meta": {
"nvd": {
"cve": {
"affected": [
{
"affectedData": [
{
"collectionURL": "https://github.com/mcu-tools/mcuboot",
"defaultStatus": "unaffected",
"packageName": "mcuboot",
"product": "mcuboot",
"vendor": "mcu-tools",
"versions": [
{
"lessThanOrEqual": "*",
"status": "affected",
"version": "1.1.0",
"versionType": "semver"
}
]
}
],
"source": "vulnerabilities@zephyrproject.org"
}
],
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "Summary\n\nMCUboot enforces several security-critical invariants on the boot, image-swap, and validation paths using assert(). In a standard release/production build (NDEBUG defined) assert() expands to a no-op, so an invariant the code intends to halt on instead falls through, and execution continues with the bad or inconsistent state. Where the guarded condition is attacker-influenceable through the flash-write boundary (serial-recovery / DFU), this is a security check that is simply absent in release builds.\n\nThis is one root cause (assert-as-security-guard, no-op under NDEBUG) with one fix approach (replace the security-critical asserts with real fail-closed checks), so it is filed as a single advisory covering the enumerated sites.\n\nWorst reachable instance \u2014 inconsistent swap status completes the swap without validation\n\nIn the swap-resume status read, an inconsistent status (erased_sections \u003e 1) is detected, logged, and \u2014 when MCUBOOT_VALIDATE_PRIMARY_SLOT is disabled \u2014 is meant to abort, because \"there is no way to be sure the swapped primary slot is OK.\" The abort is assert(0):\n\nboot/bootutil/src/swap_move.c:181-194 \u2014 if (erased_sections \u003e 1) { ... #if !defined(MCUBOOT_VALIDATE_PRIMARY_SLOT) / ... abort! / assert(0); #endif }, then execution falls through to compute bs-\u003eop/idx/state from the inconsistent status (lines 197-208) and return 0 (success).\nboot/bootutil/src/swap_offset.c:266-280 \u2014 identical pattern; falls through to bs-\u003eop/idx/state and return 0.\nboot/bootutil/src/swap_scratch.c:227-241 \u2014 same invalid/assert(0) pattern for the scratch backend.\n\nUnder NDEBUG with primary-slot validation off, the inconsistent status is neither aborted (assert is a no-op) nor re-validated (validation off), so boot_complete_partial_swap() finishes the swap on inconsistent metadata and the primary slot is booted without a signature check. An attacker who can write the swap-status trailer can craft the inconsistent status.\n\nReachability (threat model). Secondary slot + scratch trailers are A2-writable by definition (that is what a DFU upload is). Under MCUBOOT_SERIAL_RECOVERY the primary trailer is A2-writable too: boot/boot_serial/src/boot_serial.c:978 opens flash_area_id_from_multi_image_slot(img_num, 0) (== primary) and writes from offset 0 bounded by area_size, so it can paint the primary swap-status/magic. This is how the A2 (recovery/DFU, unauthenticated by design) attacker influences the guarded condition. Property violated: P1 (image authenticity / secure-boot bypass) when un-revalidated content is booted, and P6 (boot/recovery availability).\n\nSecond reachable instance \u2014 resume-path swap_size from an unguarded trailer\n\nboot/bootutil/src/loader.c:1190-1193: the swap resume branch does fap = boot_find_status(...); assert(fap != NULL); rc = boot_read_swap_size(fap, \u0026bs-\u003eswap_size); assert(rc == 0);. boot_find_status() (boot/bootutil/src/bootutil_misc.c:166-204) searches {scratch, primary} and, on no-valid-magic-match, returns the last-iterated area (primary), not NULL \u2014 so assert(fap != NULL) cannot fire even in debug, and under NDEBUG neither assert fires. swap_size is then read from an A2-writable (serial-recovery primary, or scratch) trailer with no fail-closed handling. This is the same swap-metadata-trust family as the recorded resume/swap_size disclosure.\n\nReachable-security sites (center the fix here)\n\n1. boot/bootutil/src/swap_move.c:193 \u2014 inconsistent-status assert(0), falls through to complete swap. A2 + !VALIDATE_PRIMARY. [worst]\n2. boot/bootutil/src/swap_offset.c:278 \u2014 same, swap-offset backend.\n3. boot/bootutil/src/swap_scratch.c:239 \u2014 same, swap-scratch backend.\n4. boot/bootutil/src/loader.c:1191 and :1193 \u2014 resume assert(fap != NULL) / assert(rc == 0) guarding swap_size read from an A2-writable trailer; compounded by boot_find_status() never returning NULL.\n\n(Truncated. The full description is in the advisory: https://github.com/mcu-tools/mcuboot/security/advisories/GHSA-cr9j-p626-pwcc)"
}
],
"id": "CVE-2026-16665",
"lastModified": "2026-11-24T22:18:51.420",
"metrics": {
"cvssMetricV31": [
{
"cvssData": {
"attackComplexity": "HIGH",
"attackVector": "LOCAL",
"availabilityImpact": "HIGH",
"baseScore": 7.4,
"baseSeverity": "HIGH",
"confidentialityImpact": "HIGH",
"integrityImpact": "HIGH",
"privilegesRequired": "NONE",
"scope": "UNCHANGED",
"userInteraction": "NONE",
"vectorString": "CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
"version": "3.1"
},
"exploitabilityScore": 1.4,
"impactScore": 5.9,
"source": "vulnerabilities@zephyrproject.org",
"type": "Secondary"
}
]
},
"published": "2026-11-24T22:18:51.420",
"references": [
{
"source": "vulnerabilities@zephyrproject.org",
"url": "https://github.com/mcu-tools/mcuboot/commit/133148bd5d792f781b72b8fce933ab9117780978"
},
{
"source": "vulnerabilities@zephyrproject.org",
"url": "https://github.com/mcu-tools/mcuboot/commit/18c4f19e2e0e457b86bd37274a2fef4c3e6d2850"
},
{
"source": "vulnerabilities@zephyrproject.org",
"url": "https://github.com/mcu-tools/mcuboot/commit/2d74b30860ac97f764367f3a66dc3b274a672244"
},
{
"source": "vulnerabilities@zephyrproject.org",
"url": "https://github.com/mcu-tools/mcuboot/commit/36e56d691f4e853f2f741309751b9611689f4197"
},
{
"source": "vulnerabilities@zephyrproject.org",
"url": "https://github.com/mcu-tools/mcuboot/commit/3b9159e1e04c6a09c691bdf9140bf303e3718c68"
},
{
"source": "vulnerabilities@zephyrproject.org",
"url": "https://github.com/mcu-tools/mcuboot/commit/43dc9d0d97656f1c08b2ffef2f0a3c1db62cba7e"
},
{
"source": "vulnerabilities@zephyrproject.org",
"url": "https://github.com/mcu-tools/mcuboot/commit/442c86b2131c119aab06ad4dde18ec62954d2808"
},
{
"source": "vulnerabilities@zephyrproject.org",
"url": "https://github.com/mcu-tools/mcuboot/commit/4d9424a747de9c5e74be601aebee5239e371e21c"
},
{
"source": "vulnerabilities@zephyrproject.org",
"url": "https://github.com/mcu-tools/mcuboot/commit/8e8ce11487c83975755b6ddcad69f4f42ee28977"
},
{
"source": "vulnerabilities@zephyrproject.org",
"url": "https://github.com/mcu-tools/mcuboot/commit/9365411227c79a944ee72407e51a07320489e424"
},
{
"source": "vulnerabilities@zephyrproject.org",
"url": "https://github.com/mcu-tools/mcuboot/commit/ab3fd3d4d563e57303fd0720bc0f0a93f5c619d0"
},
{
"source": "vulnerabilities@zephyrproject.org",
"url": "https://github.com/mcu-tools/mcuboot/commit/adc0e42effb9422659c9d2d63399cdce1f297648"
},
{
"source": "vulnerabilities@zephyrproject.org",
"url": "https://github.com/mcu-tools/mcuboot/commit/b0047116aa2a2cfb18f3f1bc2bd286217bc22e5c"
},
{
"source": "vulnerabilities@zephyrproject.org",
"url": "https://github.com/mcu-tools/mcuboot/commit/e0872142b9d734c116b0ed7b35657dc933c3888b"
},
{
"source": "vulnerabilities@zephyrproject.org",
"url": "https://github.com/mcu-tools/mcuboot/commit/e52ced626dd0391a0b7f175adf84b748b8db8795"
},
{
"source": "vulnerabilities@zephyrproject.org",
"url": "https://github.com/mcu-tools/mcuboot/commit/ec006b882ce618e01e7bbddcb2e5e12cb6987e0a"
},
{
"source": "vulnerabilities@zephyrproject.org",
"url": "https://github.com/mcu-tools/mcuboot/pull/3012"
},
{
"source": "vulnerabilities@zephyrproject.org",
"url": "https://github.com/mcu-tools/mcuboot/security/advisories/GHSA-cr9j-p626-pwcc"
}
],
"sourceIdentifier": "vulnerabilities@zephyrproject.org",
"vulnStatus": "Received",
"weaknesses": [
{
"description": [
{
"lang": "en",
"value": "CWE-754"
}
],
"source": "vulnerabilities@zephyrproject.org",
"type": "Secondary"
}
]
}
}
}
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.