Mcuboot
Monthly
MCUboot 1.1.0 and later can be driven to boot un-revalidated firmware in the primary slot because security-critical invariants on the swap-resume, image-swap and validation paths are enforced only by assert(), which compiles to a no-op in release builds where NDEBUG is defined. An attacker who can write the swap-status trailer through the DFU or serial-recovery flash boundary can craft an inconsistent status (erased_sections > 1) that the code intends to abort, but in a production build the check falls through and the partial swap completes on attacker-influenced metadata. Reaching the secure-boot-bypass outcome requires a narrow conjunction: a release build, MCUBOOT_VALIDATE_PRIMARY_SLOT disabled (a non-default opt-out), a swap-based backend, and A2-level write access to the swap-status trailer, with primary-trailer writes additionally requiring MCUBOOT_SERIAL_RECOVERY; builds that keep primary-slot validation enabled retain a signature re-check and carry only the robustness/availability gap. No public exploit code has been identified at time of analysis and the issue is not confirmed actively exploited (CISA KEV).
Pre-authentication stack memory corruption in MCUboot's encrypted serial-recovery upload path (versions 1.9.0 through 2.5.0) lets an attacker who can reach a device's unauthenticated serial/USB recovery interface write attacker-controlled plaintext past a sector-sized stack buffer inside the bootloader, before any signature check, giving a path to code execution in the secure-boot root of trust or a denial of service. Because the AES content key is wrapped to the device's public encryption key, an attacker does not need the image-signing private key - only the ability to author and upload a crafted encrypted image. The vector is local (AV:L, PR:N), the vulnerable path must be compiled in via MCUBOOT_ENC_IMAGES plus serial recovery, and no public exploit code was identified at time of analysis; the advisory notes an AddressSanitizer reproduction of a 2048-byte out-of-bounds write.
Unbounded CBOR recursion in MCUboot's serial-recovery command parser lets an unauthenticated party crash or hang a device in recovery mode. MCUboot 2.0.0 through 2.5.0 vendor zcbor 0.8.1, whose zcbor_any_skip() recurses one C-stack frame per level of list/map nesting with no depth cap; a single ~512-byte SMP request can carry roughly 500 nesting levels (one 0x81 byte each), reaching the vulnerable skip path via zcbor_map_decode_bulk() for unrecognised map keys and via the echo handler, both before any image signature check. Impact is availability only (stack exhaustion causing fault or hang), and real-world exposure is narrow: MCUBOOT_SERIAL is not enabled by default and recovery entry is normally gated on a physical pin, which is why this is scored AV:P at CVSS 2.4; remediation is a low-urgency upgrade, there is no public exploit identified at time of analysis, and the upstream fix (commit 1b9d870, PR #2992) bounds skip depth and is merged on main with 2.5.1 as the projected fixed release. Note that the associated tags 'Authentication Bypass' and 'Buffer Overflow' overstate the advisory's own findings, which explicitly rule out both.
MCUboot 1.6.0 through 2.4.0 hashes a candidate image over ih_hdr_size + ih_img_size + ih_protect_tlv_size taken from the image's own unauthenticated header without first verifying that the span fits inside the flash area, so an image placed in a slot via an OTA/SMP update delivered through the application or via serial recovery reaches a read past the end of the slot before its signature is checked. Whether an actual out-of-bounds read occurs depends entirely on the flash backend: bounds-checking ports (Zephyr default, Espressif, NuttX, Mbed) fail closed and simply reject the image, while the Cypress PSoC6 port's flash_area_read() and builds using MCUBOOT_HASH_STORAGE_DIRECTLY / CONFIG_BOOT_IMG_HASH_DIRECTLY_ON_STORAGE do not, allowing a read fault that can recur on every reset and keep the device from booting; on the swap/overwrite path the unbounded span is capped at roughly 64 KB, but the serial-recovery handlers and Zephyr single-slot/firmware loaders skip the header check entirely and leave ih_img_size unbounded. Nothing read past the area is disclosed - the bytes only feed a digest compared internally and never returned. Vendor-released patch: 2.5.0; no public exploit identified at time of analysis.
An out-of-bounds flash read in MCUboot's TLV iterator, bootutil_tlv_iter_next(), lets a crafted firmware image drive the parser past the declared TLV area, but the observable impact is small: a default flash build only produces a clean validation failure. MCUboot versions from 0.9.0 up to (but not including) 2.5.0 are affected, and the path is reachable pre-authentication because image TLVs are parsed in bootutil_img_validate() before the signature is verified, with a crafted image delivered through DFU, serial recovery or OTA. A genuine though bounded over-read remains only under the non-default MCUBOOT_RAM_LOAD configuration, where LOAD_IMAGE_DATA is an unchecked memcpy; a public PoC reference exists (it is not verified as working exploit code), no confirmed active exploitation (CISA KEV) is recorded, and the issue is rated low severity.
An out-of-bounds read of MCUboot's static flash-area slot table on the Zephyr port lets anyone who can reach the unauthenticated serial/SMP (MCUmgr) recovery console crash the bootloader during recovery or, less reliably, redirect an uploaded image to a flash partition outside the configured image set. The flaw is in the default non-direct serial upload path: bs_upload() latches the host-supplied 32-bit 'image' field on the off==0 packet without a range check and passes it to flash_area_id_from_multi_image_slot() before any image signature verification, affecting MCUboot 2.0.0 and later - and because MCUBOOT_IMAGE_NUMBER defaults to 1, even default single-image builds are exposed for any index of 1 or greater. CVSS 3.1 is 5.1 (AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L), reflecting low complexity and no privileges required but a LOCAL vector that requires access to the recovery transport; no active exploitation is confirmed (not in CISA KEV) and no verified working exploit code is known, although the vendor advisory cites a source-slice ASan proof-of-concept harness.
NULL pointer dereference in MCUboot's serial-recovery image-upload handler (bs_upload) crashes the bootloader during a recovery session on non-default encrypted-image builds, affecting releases 2.0.0 through 2.4.x (fixed in 2.5.0). The first upload command on a fresh session carrying a malformed CBOR map, or a packet missing the off/data members, jumps to the shared epilogue before flash_area_open() has populated fap; in MCUBOOT_ENC_IMAGES builds that epilogue unconditionally calls boot_handle_enc_fw(fap), which dereferences the NULL flash_area. Reachable unauthenticated (CVSS PR:N) from the local serial console (AV:L) on the Zephyr and Mynewt ports only, the result is a transient bootloader denial of service and only on targets that trap NULL; there is no memory corruption, information leak or impact on image authentication, no public exploit identified at time of analysis, and the reported CVSS is only 4.0 with a this_month priority label.
An out-of-bounds stack write in MCUboot's legacy split-image validation routine (split_image_check() in boot/bootutil/src/loader.c) lets the bootloader copy a 48- or 64-byte image digest into a hard-coded 32-byte stack buffer, corrupting adjacent stack memory on the split-boot path. Affected builds are MCUboot >= 2.0.0 and < 2.5.0, but only when the legacy Mynewt split-image feature is compiled in, the configured digest is SHA-384 or SHA-512, MCUBOOT_SIGN_PURE is disabled, and split_go() is actually invoked by a Mynewt application; the default SHA-256 build has no overflow. Because the overwritten bytes are a fixed-length one-way digest that is neither attacker-controlled in content nor attacker-chosen in size, impact is capped at local availability loss (CVSS 2.9, A:L) - instability or failed boot rather than reliable code execution; no public exploit code or PoC reference was identified at time of analysis, and vendor patched the issue in 2.5.0.
MCUboot's measured-boot record builder leaks uninitialised bootloader stack contents into the measurement field when it processes an image whose EXPECTED_HASH_TLV is shorter than IMAGE_HASH_SIZE, exposing up to 63 bytes of stale stack memory to any attestation service that forwards the record off-device. The flaw only bites in builds where MCUBOOT_MEASURED_BOOT is enabled and primary-slot validation has been turned off (swap/overwrite loader without MCUBOOT_VALIDATE_PRIMARY_SLOT, or Zephyr's single-slot loader including the VALIDATE_PRIMARY_SLOT_ONCE variant), and placing the crafted image requires physical or flash-write access or a serial-recovery upload; a TOCTOU change to tamperable external flash between validation and the boot-record read is a further path. Default builds fail closed because bootutil_img_validate() rejects non-exact hash TLV lengths, and the direct-XIP and RAM-load strategies are not affected; no public exploit code and no active exploitation have been reported, and vendor-released fixes are available in 2.5.0.
MCUboot builds that use the TinyCrypt AES-CTR backend leave the expanded AES-128 content-encryption key schedule sitting in bootloader RAM after boot hand-off, because bootutil_aes_ctr_drop() was an empty stub and generic code relies on that hook to clear key state. The exposure applies to MCUboot 1.3.0 through 2.4.0 built with MCUBOOT_USE_TINYCRYPT and MCUBOOT_ENC_IMAGES, in single-image configurations where boot_enc_zeroize() is not called, and specifically after an encrypted upgrade has run; the mbedTLS and PSA backends free or destroy their key state and are not affected. Recovering the key requires reading leftover bootloader RAM afterwards - physical debug (JTAG/SWD) or RAM-dump access, or code later executing on the device - and since the first AES-128 round key equals the cipher key, such a reader can recover the image content key and decrypt that encrypted image; the long-term private decryption key and image authenticity are not affected. No public exploit code or proof-of-concept has been identified at time of analysis, and this is a monitor-priority, low-severity issue with a vendor-released patch.
MCUboot 1.9.0 through 2.4.0 built with encrypted-image support (MCUBOOT_ENC_IMAGES / Zephyr CONFIG_BOOT_ENCRYPT_IMAGE) together with serial recovery leaves a per-image AES content key in dead stack memory, allowing an attacker who can later read device RAM - via a debug port or retained memory across reset - to recover the key and decrypt protected firmware images. The leak occurs in decrypt_image_inplace() during a primary-slot upload over the recovery protocol and in boot_image_validate_encrypted() when image list or state is queried with an encrypted image in the secondary slot; the stack-local struct boot_status carrying enckey[] is never wiped, and early error returns bypass the boot_enc_zeroize()/expanded-key-context cleanup. The exposure is constrained: no recovery-protocol or remote channel returns this memory (CVSS 3.1 base score 2.0, AV:P/AC:H, C:L, no integrity or availability impact), only the single per-build image content key is exposed rather than the device's long-term private decryption key, and no public exploit has been identified at time of analysis. A vendor fix is available in MCUboot 2.5.0.
MCUboot 1.1.0 and later can be driven to boot un-revalidated firmware in the primary slot because security-critical invariants on the swap-resume, image-swap and validation paths are enforced only by assert(), which compiles to a no-op in release builds where NDEBUG is defined. An attacker who can write the swap-status trailer through the DFU or serial-recovery flash boundary can craft an inconsistent status (erased_sections > 1) that the code intends to abort, but in a production build the check falls through and the partial swap completes on attacker-influenced metadata. Reaching the secure-boot-bypass outcome requires a narrow conjunction: a release build, MCUBOOT_VALIDATE_PRIMARY_SLOT disabled (a non-default opt-out), a swap-based backend, and A2-level write access to the swap-status trailer, with primary-trailer writes additionally requiring MCUBOOT_SERIAL_RECOVERY; builds that keep primary-slot validation enabled retain a signature re-check and carry only the robustness/availability gap. No public exploit code has been identified at time of analysis and the issue is not confirmed actively exploited (CISA KEV).
Pre-authentication stack memory corruption in MCUboot's encrypted serial-recovery upload path (versions 1.9.0 through 2.5.0) lets an attacker who can reach a device's unauthenticated serial/USB recovery interface write attacker-controlled plaintext past a sector-sized stack buffer inside the bootloader, before any signature check, giving a path to code execution in the secure-boot root of trust or a denial of service. Because the AES content key is wrapped to the device's public encryption key, an attacker does not need the image-signing private key - only the ability to author and upload a crafted encrypted image. The vector is local (AV:L, PR:N), the vulnerable path must be compiled in via MCUBOOT_ENC_IMAGES plus serial recovery, and no public exploit code was identified at time of analysis; the advisory notes an AddressSanitizer reproduction of a 2048-byte out-of-bounds write.
Unbounded CBOR recursion in MCUboot's serial-recovery command parser lets an unauthenticated party crash or hang a device in recovery mode. MCUboot 2.0.0 through 2.5.0 vendor zcbor 0.8.1, whose zcbor_any_skip() recurses one C-stack frame per level of list/map nesting with no depth cap; a single ~512-byte SMP request can carry roughly 500 nesting levels (one 0x81 byte each), reaching the vulnerable skip path via zcbor_map_decode_bulk() for unrecognised map keys and via the echo handler, both before any image signature check. Impact is availability only (stack exhaustion causing fault or hang), and real-world exposure is narrow: MCUBOOT_SERIAL is not enabled by default and recovery entry is normally gated on a physical pin, which is why this is scored AV:P at CVSS 2.4; remediation is a low-urgency upgrade, there is no public exploit identified at time of analysis, and the upstream fix (commit 1b9d870, PR #2992) bounds skip depth and is merged on main with 2.5.1 as the projected fixed release. Note that the associated tags 'Authentication Bypass' and 'Buffer Overflow' overstate the advisory's own findings, which explicitly rule out both.
MCUboot 1.6.0 through 2.4.0 hashes a candidate image over ih_hdr_size + ih_img_size + ih_protect_tlv_size taken from the image's own unauthenticated header without first verifying that the span fits inside the flash area, so an image placed in a slot via an OTA/SMP update delivered through the application or via serial recovery reaches a read past the end of the slot before its signature is checked. Whether an actual out-of-bounds read occurs depends entirely on the flash backend: bounds-checking ports (Zephyr default, Espressif, NuttX, Mbed) fail closed and simply reject the image, while the Cypress PSoC6 port's flash_area_read() and builds using MCUBOOT_HASH_STORAGE_DIRECTLY / CONFIG_BOOT_IMG_HASH_DIRECTLY_ON_STORAGE do not, allowing a read fault that can recur on every reset and keep the device from booting; on the swap/overwrite path the unbounded span is capped at roughly 64 KB, but the serial-recovery handlers and Zephyr single-slot/firmware loaders skip the header check entirely and leave ih_img_size unbounded. Nothing read past the area is disclosed - the bytes only feed a digest compared internally and never returned. Vendor-released patch: 2.5.0; no public exploit identified at time of analysis.
An out-of-bounds flash read in MCUboot's TLV iterator, bootutil_tlv_iter_next(), lets a crafted firmware image drive the parser past the declared TLV area, but the observable impact is small: a default flash build only produces a clean validation failure. MCUboot versions from 0.9.0 up to (but not including) 2.5.0 are affected, and the path is reachable pre-authentication because image TLVs are parsed in bootutil_img_validate() before the signature is verified, with a crafted image delivered through DFU, serial recovery or OTA. A genuine though bounded over-read remains only under the non-default MCUBOOT_RAM_LOAD configuration, where LOAD_IMAGE_DATA is an unchecked memcpy; a public PoC reference exists (it is not verified as working exploit code), no confirmed active exploitation (CISA KEV) is recorded, and the issue is rated low severity.
An out-of-bounds read of MCUboot's static flash-area slot table on the Zephyr port lets anyone who can reach the unauthenticated serial/SMP (MCUmgr) recovery console crash the bootloader during recovery or, less reliably, redirect an uploaded image to a flash partition outside the configured image set. The flaw is in the default non-direct serial upload path: bs_upload() latches the host-supplied 32-bit 'image' field on the off==0 packet without a range check and passes it to flash_area_id_from_multi_image_slot() before any image signature verification, affecting MCUboot 2.0.0 and later - and because MCUBOOT_IMAGE_NUMBER defaults to 1, even default single-image builds are exposed for any index of 1 or greater. CVSS 3.1 is 5.1 (AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L), reflecting low complexity and no privileges required but a LOCAL vector that requires access to the recovery transport; no active exploitation is confirmed (not in CISA KEV) and no verified working exploit code is known, although the vendor advisory cites a source-slice ASan proof-of-concept harness.
NULL pointer dereference in MCUboot's serial-recovery image-upload handler (bs_upload) crashes the bootloader during a recovery session on non-default encrypted-image builds, affecting releases 2.0.0 through 2.4.x (fixed in 2.5.0). The first upload command on a fresh session carrying a malformed CBOR map, or a packet missing the off/data members, jumps to the shared epilogue before flash_area_open() has populated fap; in MCUBOOT_ENC_IMAGES builds that epilogue unconditionally calls boot_handle_enc_fw(fap), which dereferences the NULL flash_area. Reachable unauthenticated (CVSS PR:N) from the local serial console (AV:L) on the Zephyr and Mynewt ports only, the result is a transient bootloader denial of service and only on targets that trap NULL; there is no memory corruption, information leak or impact on image authentication, no public exploit identified at time of analysis, and the reported CVSS is only 4.0 with a this_month priority label.
An out-of-bounds stack write in MCUboot's legacy split-image validation routine (split_image_check() in boot/bootutil/src/loader.c) lets the bootloader copy a 48- or 64-byte image digest into a hard-coded 32-byte stack buffer, corrupting adjacent stack memory on the split-boot path. Affected builds are MCUboot >= 2.0.0 and < 2.5.0, but only when the legacy Mynewt split-image feature is compiled in, the configured digest is SHA-384 or SHA-512, MCUBOOT_SIGN_PURE is disabled, and split_go() is actually invoked by a Mynewt application; the default SHA-256 build has no overflow. Because the overwritten bytes are a fixed-length one-way digest that is neither attacker-controlled in content nor attacker-chosen in size, impact is capped at local availability loss (CVSS 2.9, A:L) - instability or failed boot rather than reliable code execution; no public exploit code or PoC reference was identified at time of analysis, and vendor patched the issue in 2.5.0.
MCUboot's measured-boot record builder leaks uninitialised bootloader stack contents into the measurement field when it processes an image whose EXPECTED_HASH_TLV is shorter than IMAGE_HASH_SIZE, exposing up to 63 bytes of stale stack memory to any attestation service that forwards the record off-device. The flaw only bites in builds where MCUBOOT_MEASURED_BOOT is enabled and primary-slot validation has been turned off (swap/overwrite loader without MCUBOOT_VALIDATE_PRIMARY_SLOT, or Zephyr's single-slot loader including the VALIDATE_PRIMARY_SLOT_ONCE variant), and placing the crafted image requires physical or flash-write access or a serial-recovery upload; a TOCTOU change to tamperable external flash between validation and the boot-record read is a further path. Default builds fail closed because bootutil_img_validate() rejects non-exact hash TLV lengths, and the direct-XIP and RAM-load strategies are not affected; no public exploit code and no active exploitation have been reported, and vendor-released fixes are available in 2.5.0.
MCUboot builds that use the TinyCrypt AES-CTR backend leave the expanded AES-128 content-encryption key schedule sitting in bootloader RAM after boot hand-off, because bootutil_aes_ctr_drop() was an empty stub and generic code relies on that hook to clear key state. The exposure applies to MCUboot 1.3.0 through 2.4.0 built with MCUBOOT_USE_TINYCRYPT and MCUBOOT_ENC_IMAGES, in single-image configurations where boot_enc_zeroize() is not called, and specifically after an encrypted upgrade has run; the mbedTLS and PSA backends free or destroy their key state and are not affected. Recovering the key requires reading leftover bootloader RAM afterwards - physical debug (JTAG/SWD) or RAM-dump access, or code later executing on the device - and since the first AES-128 round key equals the cipher key, such a reader can recover the image content key and decrypt that encrypted image; the long-term private decryption key and image authenticity are not affected. No public exploit code or proof-of-concept has been identified at time of analysis, and this is a monitor-priority, low-severity issue with a vendor-released patch.
MCUboot 1.9.0 through 2.4.0 built with encrypted-image support (MCUBOOT_ENC_IMAGES / Zephyr CONFIG_BOOT_ENCRYPT_IMAGE) together with serial recovery leaves a per-image AES content key in dead stack memory, allowing an attacker who can later read device RAM - via a debug port or retained memory across reset - to recover the key and decrypt protected firmware images. The leak occurs in decrypt_image_inplace() during a primary-slot upload over the recovery protocol and in boot_image_validate_encrypted() when image list or state is queried with an encrypted image in the secondary slot; the stack-local struct boot_status carrying enckey[] is never wiped, and early error returns bypass the boot_enc_zeroize()/expanded-key-context cleanup. The exposure is constrained: no recovery-protocol or remote channel returns this memory (CVSS 3.1 base score 2.0, AV:P/AC:H, C:L, no integrity or availability impact), only the single per-build image content key is exposed rather than the device's long-term private decryption key, and no public exploit has been identified at time of analysis. A vendor fix is available in MCUboot 2.5.0.