CVE-2021-27138 Overview
CVE-2021-27138 is a bootloader vulnerability affecting Das U-Boot before version 2021.04-rc2. The vulnerability exists in how the boot loader mishandles the use of unit addresses in a Flattened Image Tree (FIT). This improper handling can lead to high impacts on confidentiality, integrity, and availability of affected systems.
Critical Impact
Successful exploitation of this bootloader vulnerability could allow an attacker with local access to compromise system confidentiality, integrity, and availability through malicious FIT image manipulation.
Affected Products
- DENX U-Boot versions prior to 2021.04-rc2
- DENX U-Boot version 2021.04-rc1
- Embedded systems and devices utilizing vulnerable U-Boot versions
Discovery Timeline
- 2021-02-17 - CVE-2021-27138 published to NVD
- 2025-11-03 - Last updated in NVD database
Technical Details for CVE-2021-27138
Vulnerability Analysis
Das U-Boot is a widely-used open-source bootloader for embedded systems, commonly found in IoT devices, routers, network equipment, and other embedded platforms. The vulnerability resides in how U-Boot processes Flattened Image Tree (FIT) images, which are used to bundle multiple firmware components like kernel images, device tree blobs, and ramdisks into a single bootable image.
The core issue stems from improper handling of unit addresses within FIT image structures. When parsing FIT images, U-Boot fails to properly validate or handle unit address references, which can lead to memory corruption or other undefined behavior during the boot process.
This vulnerability requires local access to exploit, meaning an attacker would need the ability to provide a malicious FIT image to the boot process. However, in environments where firmware updates are delivered over the network or where boot images can be modified, this represents a significant security risk that could enable persistent compromise of the device.
Root Cause
The root cause of CVE-2021-27138 is the improper handling of unit addresses during FIT image parsing in Das U-Boot. Unit addresses are used in device tree and FIT structures to uniquely identify nodes and components. The bootloader fails to properly validate or process these unit addresses, leading to potential memory safety issues when parsing maliciously crafted FIT images.
The vulnerability was addressed through multiple commits to the U-Boot repository, indicating the fix required changes across several components of the FIT parsing logic.
Attack Vector
The attack vector is local, requiring an attacker to have the ability to provide a malicious FIT image to the U-Boot boot process. Exploitation scenarios include:
- Modifying firmware update packages containing FIT images
- Compromising update delivery mechanisms to inject malicious FIT images
- Physical access to boot media containing FIT images
- Supply chain attacks targeting firmware distribution
The vulnerability does require user interaction, as a user or automated process must initiate a boot or firmware update operation with the malicious FIT image. However, no special privileges are required to craft the malicious image, and successful exploitation can result in complete compromise of the boot process with high impacts to system confidentiality, integrity, and availability.
Detection Methods for CVE-2021-27138
Indicators of Compromise
- Unexpected modifications to FIT image files or firmware packages
- Anomalous boot behavior or boot failures after firmware updates
- Integrity check failures on boot images or firmware components
- Unusual error messages during U-Boot initialization related to FIT parsing
Detection Strategies
- Implement firmware integrity verification using cryptographic signatures before boot
- Monitor firmware update processes for unauthorized modifications
- Deploy file integrity monitoring on systems storing FIT images and firmware packages
- Audit boot logs for unusual FIT parsing errors or unexpected behavior
Monitoring Recommendations
- Enable verbose U-Boot logging to capture detailed boot process information
- Implement secure boot chains with signature verification at each stage
- Monitor network traffic for unauthorized firmware distribution or tampering
- Establish baseline boot behavior profiles to detect anomalies
How to Mitigate CVE-2021-27138
Immediate Actions Required
- Upgrade Das U-Boot to version 2021.04-rc2 or later
- Implement FIT image signature verification to prevent loading of untrusted images
- Review and restrict access to firmware update mechanisms
- Audit existing FIT images and firmware packages for integrity
Patch Information
DENX has addressed this vulnerability through multiple commits to the U-Boot repository. The fixes are included in version 2021.04-rc2 and all subsequent releases. Organizations should update to the latest stable release of U-Boot to receive this fix along with other security improvements.
The patches can be reviewed at the following locations:
For Debian-based systems, refer to the Debian LTS Security Announcement for distribution-specific patch information.
Workarounds
- Enable FIT signature verification to prevent loading of unsigned or tampered images
- Restrict physical and logical access to boot media and firmware storage
- Implement network segmentation to protect firmware update infrastructure
- Use secure boot mechanisms where available to establish a root of trust
# Enable FIT signature verification in U-Boot configuration
# Add to your board configuration or defconfig file
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_SIGNATURE_ENFORCE=y
CONFIG_RSA=y
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


