CVE DatabaseCVE-2021-27562
한국어 권고문 →
CVE-2021-275625.5/MEDIUMCISA KEVCWE-787CWE-787

Arm Trusted Firmware-M (TF-M) Security Domain Bypass and Denial of Service Vulnerability (CVE-2021-27562)

⚡ Jump to Patch
Affected Vendors
arm
Affected Components
trusted-firmware-m
Published Date
2021-05-25
CVSS v3.1
5.5
MEDIUM
EPSS (30d)
3.1%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

Arm Trusted Firmware-M (TF-M) versions up to and including 1.2, deployed on IoT and embedded hardware

Impact

Non-secure world (NSPE) attackers can trigger system halts, overwrite secure data, or leak sensitive secure domain information

Mitigation

Upgrade the TF-M source code to a patched version (v1.3.0 or higher), rebuild, and flash the firmware

Affected Products & Version Scope

Arm Trusted Firmware-M (TF-M) versions 1.0, 1.1, and 1.2 (all versions <= 1.2)

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

Update your TF-M source repository to the latest stable release (v1.3.0 or higher) and rebuild the firmware. Use the following commands to fetch the patched release branch and compile the binary:

bash
# Navigate to the TF-M source directory
cd /path/to/trusted-firmware-m

# Fetch all tags and checkout the patched version (v1.3.0)
git fetch --all --tags
git checkout TF-M-v1.3.0

# Initialize build directory and configure CMake for your target platform
mkdir -p build && cd build
cmake -DTFM_PLATFORM=an521 -DCOMPILER=GNUARM ..

# Compile the secure firmware
make -j$(nproc)

2. Temporary Workaround & Hardening Configuration

If immediate firmware flashing is not feasible, restrict the non-secure world (NSPE) applications from invoking secure functions directly from handler mode (e.g., inside Interrupt Service Routines - ISRs).

c
/* Temporary mitigation within NSPE application code */
void NonSecure_Handler_Mode_ISR(void) {
    /* DO NOT call secure APIs directly inside Handler Mode (ISR) */
    // error: secure_function_call(); 
    
    /* Instead, set a pending flag and handle it in Thread Mode */
    g_secure_task_pending = 1;
}

3. Log Audit & IoC Verification Commands

Use the following script to verify the TF-M version in your build environment and scan for vulnerable code patterns related to SVC caller stack pointer fetching:

bash
# Check the current TF-M version from the version file
if [ -f 'version.txt' ]; then
    echo '[INFO] TF-M Version:'
    cat version.txt
else
    grep -r 'define TFM_VERSION' .
fi

# Search for vulnerable SVC handler implementation patterns
echo '[INFO] Scanning for vulnerable SVC caller SP fetching logic...'
grep -rn 'tfm_core_svc_handler' . --include='*.c'
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
SentinelOne Singularity AI EDR
As this vulnerability is listed in the CISA KEV catalog, immediately upgrade your Arm TF-M based firmware to v1.3.0 or higher and redeploy.

Block Kernel Privilege Escalation & Ransomware Payloads Before You Can Reboot

Protect unpatched Windows, Linux, and macOS workloads against in-memory exploitation and lateral movement with autonomous EDR.

100% MITRE ATT&CK Detection · 1-Click Rollback

Technical Root Cause & Exploitation Mechanics

1. Vulnerability Overview & Root Cause

This vulnerability (CVE-2021-27562) is a security boundary bypass and memory corruption flaw in Arm Trusted Firmware-M (TF-M), which provides the secure execution environment for Arm Cortex-M processors. The root cause lies in the improper validation of the caller's stack pointer (SP) and execution context when secure functions are invoked from the Non-Secure Processing Environment (NSPE) handler mode. This allows the Secure Processing Environment (SPE) to trust an invalid context from the non-secure side, leading to an out-of-bounds write (CWE-787) condition.

2. Exploitation Mechanics & Attack Scenario

An attacker with low privileges executing code within the non-secure world (NSPE) can exploit this vulnerability. When invoking secure APIs via Supervisor Calls (SVC) or Secure Gateway (SG) instructions from the NSPE handler mode, the TF-M SVC handler fails to correctly determine whether the calling context's stack pointer is the Main Stack Pointer (MSP) or the Process Stack Pointer (PSP). By manipulating this validation gap, the attacker can force the secure world to reference arbitrary memory locations in the non-secure world. This can be leveraged to overwrite critical secure memory structures, leak sensitive data (such as cryptographic keys) to the non-secure world, or trigger a hardware fault that halts the entire system.

3. Infrastructure & Business Impact

Arm TF-M is a foundational component establishing the hardware Root of Trust (RoT) in high-stakes embedded systems, including smart home devices, industrial IoT sensors, and medical equipment. This vulnerability is highly critical and is cataloged in CISA's Known Exploited Vulnerabilities (KEV), indicating active exploitation in the wild. Successful exploitation compromises the TrustZone isolation barrier, potentially granting attackers full control over the device or causing widespread operational disruption across IoT infrastructures.

Official Vendor Advisories & References

Frequently Asked SecOps Questions (CVE-2021-27562)

FAQ

Q1. How critical is CVE-2021-27562 and is it actively exploited in the wild?

CVE-2021-27562 is rated CVSS 5.5 (MEDIUM) with a 30-day EPSS exploitation probability of 3.1%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.

Q2. Which vendors and products are affected by CVE-2021-27562?

Primary impacted vendors include arm across trusted-firmware-m. Scope summary: Arm Trusted Firmware-M (TF-M) versions 1.0, 1.1, and 1.2 (all versions <= 1.2)

Q3. What temporary mitigations or workarounds exist for CVE-2021-27562 before patching?

[Mitigation] Upgrade the TF-M source code to a patched version (v1.3.0 or higher), rebuild, and flash the firmware Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.

SECOPS WORKBENCH INTEGRATION

Generate an Internal Engineering Notice or CISO Report for CVE-2021-27562

Instantly format this advisory into an executive CISO summary or engineering patch ticket.

Generate Report →

🔗 Related Advisories in Similar Stack (arm)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2021-27562 Arm Trusted Firmware-M (TF-M) Security Domain Bypass and Denial of Service Vulnerability (CVE-2021-27562) (CVSS 5.5) - Patch & Workaround | CVE Pulse