CVE-2021-46772
Executive Summary
CVE-2021-46772 is a local privilege escalation vulnerability in American Megatrends Inc. (AMI) Aptio® V BIOS firmware, specifically within the ABL (Aptio Boot Loader) component. The flaw arises from insufficient input validation when processing structure headers in the SPI ROM. A privileged attacker with physical or console access to the BIOS menu or UEFI shell can trigger an out-of-bounds memory read and write, leading to memory corruption or denial of service. The CVSS v3.1 base score is 3.9 (Low), reflecting the high privileges required and local attack vector. No public exploit code or proof-of-concept is currently available, and the patch status remains unknown.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is not related to NPM, PyPI, Go, or Ruby packages. It is a firmware-level issue in AMI’s Aptio V BIOS, affecting the hardware supply chain of devices using this firmware. Organizations should verify the BIOS version of their AMI-based systems and contact the vendor for patch availability.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Local (L) – Requires physical or console access.
- Attack Complexity (AC): Low (L) – No special conditions beyond access.
- Privileges Required (PR): High (H) – Attacker must have BIOS menu or UEFI shell access.
- User Interaction (UI): None (N) – No user action needed beyond the attacker’s own.
- Scope (S): Unchanged (U) – Exploit does not cross trust boundaries.
- Confidentiality (C): None (N) – No data disclosure.
- Integrity (I): Low (L) – Potential memory corruption.
- Availability (A): Low (L) – Potential denial of service.
Threat Level: Low. The high privilege requirement and local access significantly limit exploitability in typical enterprise environments.
Deep Dive & Mechanics
The ABL (Aptio Boot Loader) is a critical component of AMI’s Aptio V UEFI firmware responsible for initializing hardware and loading the operating system. The vulnerability exists in the code that parses structure headers within the SPI ROM (Serial Peripheral Interface Read-Only Memory). These headers define the layout and metadata of firmware regions.
Root Cause: The ABL fails to properly validate the size or offset fields within these structure headers. By crafting a malicious header, an attacker can cause the firmware to read or write beyond the intended buffer boundaries.
Attack Flow:
- Attacker gains access to the BIOS menu (e.g., via physical presence or remote console) or UEFI shell.
- Attacker modifies the SPI ROM content (e.g., by flashing a tampered firmware image or using UEFI shell commands).
- The tampered structure header contains an out-of-bounds offset or size.
- When the ABL processes this header, it performs a memory read or write outside the allocated buffer.
- This can corrupt adjacent firmware data, leading to system instability, boot failure, or potential code execution (though not confirmed).
Impact: Memory corruption or denial of service. The attacker cannot directly read sensitive data (confidentiality impact is None) but can disrupt system availability or integrity.
Vulnerable vs. Patched Code
No official patch or code diff is available. The vulnerable code is in the ABL module of AMI Aptio V firmware. A hypothetical fix would involve adding bounds checking before accessing SPI ROM structure headers.
Vulnerable Code (Conceptual):
// No validation of header->size
void process_header(Header *hdr) {
uint8_t *data = malloc(hdr->size);
memcpy(data, hdr->data, hdr->size); // Potential OOB read
// ... process data ...
}
Patched Code (Conceptual):
void process_header(Header *hdr) {
if (hdr->size > MAX_HEADER_SIZE) {
return; // Reject oversized header
}
uint8_t *data = malloc(hdr->size);
memcpy(data, hdr->data, hdr->size);
// ... process data ...
}
Exploitation & Lab Setup
Red Team
No public exploit code exists. To simulate the vulnerability in a lab:
- Environment: A system with AMI Aptio V firmware (e.g., a server or workstation).
- Access: Obtain BIOS menu or UEFI shell access (e.g., via physical console or IPMI).
- Craft Malicious Header: Use a hex editor to modify a firmware image, altering a structure header’s size field to a large value (e.g., 0xFFFF).
- Flash Firmware: Use vendor tools (e.g., AFUWIN, AMI Flash) to write the tampered image to SPI ROM.
- Trigger: Reboot the system. The ABL will process the malicious header, causing an out-of-bounds read/write, potentially crashing the boot process.
Note: This is a destructive test. Use a non-production system.
Blue Team
- Detection: Monitor for unexpected system reboots or boot failures. Use UEFI firmware integrity monitoring tools (e.g., CHIPSEC) to verify SPI ROM headers.
- Prevention: Restrict physical and console access to systems. Disable UEFI shell access in BIOS settings. Enable Secure Boot and firmware write protection.
- Hunting: Look for logs indicating BIOS configuration changes or firmware flash events.
Indicators of Compromise (IOCs)
- File: Tampered SPI ROM image with abnormal header size fields.
- Behavior: System fails to boot or enters a boot loop after firmware update.
- Log: UEFI event log entries showing “Firmware corruption detected” or similar.
- Registry (Windows):
HKLM\HARDWARE\DESCRIPTION\System\BIOS– Modified BIOS version string.
Detection Engineering
YARA Rule
rule CVE_2021_46772_ABL_OOB {
meta:
description = "Detects tampered AMI Aptio V SPI ROM headers indicative of CVE-2021-46772"
author = "Valters IT"
date = "2025-04-17"
reference = "CVE-2021-46772"
strings:
$header_magic = { 5A 5A 5A 5A } // Example magic bytes for ABL header
$large_size = { FF FF 00 00 } // Size field > 0xFFFF
condition:
$header_magic and $large_size
}
Sigma Rule
title: Potential CVE-2021-46772 Exploitation via SPI ROM Tampering
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects events indicating tampering with AMI Aptio V SPI ROM headers.
author: Valters IT
logsource:
product: windows
service: system
detection:
selection:
EventID: 41 # System reboot without clean shutdown
Provider_Name: 'Microsoft-Windows-Kernel-Power'
condition: selection
falsepositives:
- Unexpected power loss
level: low
Suricata Rule
alert ip any any -> any any (msg:"CVE-2021-46772 - Potential SPI ROM Header Tampering"; content:"|5A 5A 5A 5A|"; offset:0; depth:4; content:"|FF FF 00 00|"; within:1024; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
- Patch: Contact AMI or your hardware vendor for a firmware update that includes bounds checking in the ABL.
- Workaround: Disable UEFI shell access in BIOS settings. Restrict physical access to systems.
- Monitoring: Use firmware integrity tools (e.g., CHIPSEC, Intel Firmware Support Package) to detect unauthorized SPI ROM modifications.
- Hardening: Enable Secure Boot and set BIOS supervisor password. Enable SPI flash write protection if supported.
Valters IT – DevSecOps & Cyber Threat Intelligence