CVE-2021-31532 Overview
CVE-2021-31532 is a firmware vulnerability affecting multiple NXP microcontroller families, including the LPC55S6x, LPC55S2x, LPC552x, LPC55S1x, LPC551x, LPC55S0x, LPC550x, i.MX RT500, and i.MX RT600 series. The vulnerability stems from an undocumented ROM patch peripheral present in these microcontrollers that allows unsigned, non-persistent modification of the internal ROM. This security weakness could enable an attacker with physical access to bypass security mechanisms and modify the behavior of the microcontroller's ROM code.
Critical Impact
Physical attackers can modify internal ROM code without cryptographic verification, potentially compromising the device's root of trust and enabling secure boot bypass on affected NXP microcontrollers.
Affected Products
- NXP LPC55S6x microcontrollers (silicon rev 0A and 1B)
- NXP i.MX RT500 (silicon rev B1 and B2) and i.MX RT600 (silicon rev A0, B0)
- NXP LPC55S2x, LPC552x (silicon rev 0A, 1B), LPC55S1x, LPC551x (silicon rev 0A), LPC55S0x, LPC550x (silicon rev 0A)
Discovery Timeline
- May 6, 2021 - CVE-2021-31532 published to NVD
- November 21, 2024 - Last updated in NVD database
Technical Details for CVE-2021-31532
Vulnerability Analysis
This vulnerability represents a significant security flaw in NXP's ARM Cortex-M33 based microcontrollers. The affected devices contain an undocumented ROM patch peripheral that was designed to allow NXP to apply corrections to the internal ROM code. However, this mechanism lacks proper cryptographic authentication, meaning it accepts unsigned modifications to the ROM.
The ROM code in these microcontrollers serves as the foundation for secure boot processes and other critical security functions. By allowing unsigned modifications, an attacker can potentially alter the boot sequence, disable security checks, or inject malicious code that executes during the device's startup phase. While the modifications are non-persistent (cleared on power cycle), they remain effective during the device's operational session.
Root Cause
The root cause of CVE-2021-31532 is the inclusion of an undocumented ROM patch peripheral that accepts unsigned code modifications. This peripheral was likely intended for manufacturing or debugging purposes but was not properly secured or removed from production silicon. The lack of cryptographic verification for ROM patches violates secure boot architecture principles, where all code execution paths should be authenticated.
Attack Vector
The attack requires physical access to the target device. An attacker must be able to interact with the microcontroller through debug interfaces such as SWD (Serial Wire Debug) or JTAG, or through other physical means of accessing the ROM patch peripheral registers. Once physical access is obtained, the attacker can use the undocumented peripheral to inject unsigned modifications into the ROM address space.
The exploitation process typically involves:
- Gaining physical access to the target embedded device
- Accessing the microcontroller through debug interfaces or direct hardware manipulation
- Writing to the undocumented ROM patch peripheral registers
- Modifying ROM behavior to bypass security controls or execute arbitrary code
Detailed technical analysis of this vulnerability is available in the Oxide Blog Post.
Detection Methods for CVE-2021-31532
Indicators of Compromise
- Unexpected modifications to ROM patch peripheral registers during device operation
- Anomalous debug interface activity or unauthorized SWD/JTAG connections
- Secure boot failures or unexpected code execution paths during startup
- Changes in device behavior that revert after power cycling
Detection Strategies
- Implement hardware tamper detection mechanisms to identify physical access attempts
- Monitor debug interface status and alert on unexpected debug connections
- Deploy runtime integrity verification of critical ROM functions
- Perform periodic audits of embedded devices for signs of physical tampering
Monitoring Recommendations
- Log all debug interface connections and access attempts in connected systems
- Implement anomaly detection for device boot sequences and timing
- Monitor for unusual power consumption patterns that may indicate active exploitation
- Establish baselines for normal device behavior to identify deviations
How to Mitigate CVE-2021-31532
Immediate Actions Required
- Inventory all deployed NXP microcontrollers to identify affected silicon revisions
- Implement physical security controls to prevent unauthorized access to embedded devices
- Disable or restrict debug interfaces where operationally feasible
- Assess the security impact based on the sensitivity of applications running on affected devices
Patch Information
As this vulnerability exists in the silicon hardware, traditional software patches cannot fully remediate the issue. Organizations should consult the NXP Security Portal for guidance on affected silicon revisions and any available mitigations. NXP may have addressed this issue in newer silicon revisions, and upgrading hardware may be necessary for applications requiring the highest security levels.
Workarounds
- Implement physical tamper-evident enclosures for devices containing affected microcontrollers
- Disable debug interfaces permanently through one-time programmable (OTP) fuses where supported
- Deploy additional application-level integrity checks that verify critical code at runtime
- Consider architectural changes that add defense-in-depth layers independent of ROM security
# Example: Checking silicon revision on NXP LPC55 devices
# Use NXP's MCUXpresso tools to identify the silicon revision
# Devices with silicon rev 0A or 1B for LPC55S6x are affected
# Consult device SYSCON registers for revision information
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


