CVE-2024-49200
Executive Summary
CVE-2024-49200 is a critical memory corruption vulnerability in InsydeH2O UEFI firmware, specifically within the AcpiS3SaveDxe and ChipsetSvcDxe DXE drivers. The vulnerability allows a privileged attacker (e.g., with kernel or system management mode access) to perform arbitrary writes to memory by leveraging a pointer derived from an NVRAM variable. This can lead to arbitrary code execution within the firmware environment, potentially compromising the entire system at a level below the operating system. The vulnerability affects InsydeH2O kernels 5.2 through 5.7. Patches are available from Insyde.
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 software packages (NPM, PyPI, Go, Ruby) but is a firmware-level issue. The supply chain risk involves the distribution of UEFI firmware updates by OEMs (Original Equipment Manufacturers) that use InsydeH2O. Organizations must ensure they receive and apply patched firmware from their hardware vendors.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (NVD) / Estimated: 8.2 (High)
- Vector: CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
- Attack Vector (AV): Local (requires physical or privileged OS access)
- Attack Complexity (AC): Low
- Privileges Required (PR): High (requires kernel or SMM access)
- User Interaction (UI): None
- Scope (S): Changed (vulnerability in firmware can affect OS)
- Confidentiality (C): High
- Integrity (I): High
- Availability (A): High
- Threat Level: High. Exploitation could lead to persistent firmware-level compromise, bypassing OS security controls.
Deep Dive & Mechanics
The vulnerability resides in the AcpiS3SaveDxe and ChipsetSvcDxe DXE drivers. These drivers handle ACPI S3 (Suspend-to-RAM) state transitions and chipset services. The root cause is that the drivers use a pointer obtained from an NVRAM variable as the target of a write operation without proper validation.
Mechanism:
- An attacker with elevated privileges (e.g., kernel-mode code execution) can modify a specific NVRAM variable.
- When the system enters or resumes from S3 sleep, or when a chipset service is invoked, the vulnerable driver reads this NVRAM variable.
- The driver treats the value of the NVRAM variable as a memory pointer.
- The driver then writes data to this attacker-controlled pointer.
- This arbitrary write can be used to overwrite critical firmware structures, such as SMM (System Management Mode) code, boot scripts, or other DXE drivers, leading to arbitrary code execution in the firmware context.
The vulnerability is particularly dangerous because it can be exploited from the OS kernel to compromise the firmware, which persists across reboots and is invisible to standard OS security tools.
Vulnerable vs. Patched Code
The vulnerable code pattern involves reading an NVRAM variable and using it directly as a pointer without validation.
Vulnerable (Conceptual):
// Vulnerable: No validation of NVRAM variable value
EFI_STATUS GetNvramPointer(UINTN *Pointer) {
UINTN Size = sizeof(UINTN);
return gRT->GetVariable(L"AttackerControlledVar", &gVendorGuid, NULL, &Size, Pointer);
}
void VulnerableFunction() {
UINTN TargetPointer;
if (GetNvramPointer(&TargetPointer) == EFI_SUCCESS) {
// Arbitrary write to attacker-controlled address
*(UINT64 *)TargetPointer = 0xDEADBEEF;
}
}
Patched (Conceptual):
// Patched: Validate that the pointer is within a safe memory range
EFI_STATUS GetNvramPointer(UINTN *Pointer) {
UINTN Size = sizeof(UINTN);
EFI_STATUS Status = gRT->GetVariable(L"AttackerControlledVar", &gVendorGuid, NULL, &Size, Pointer);
if (Status == EFI_SUCCESS) {
// Validate pointer is within allowed firmware data region
if (*Pointer < gFirmwareDataBase || *Pointer >= gFirmwareDataBase + gFirmwareDataSize) {
return EFI_INVALID_PARAMETER;
}
}
return Status;
}
void PatchedFunction() {
UINTN TargetPointer;
if (GetNvramPointer(&TargetPointer) == EFI_SUCCESS) {
// Safe write within validated range
*(UINT64 *)TargetPointer = 0xDEADBEEF;
}
}
The patch adds bounds checking to ensure the pointer derived from the NVRAM variable points to a legitimate, pre-defined memory region.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Physical access or kernel-mode code execution on the target system.
- Knowledge of the target's firmware version and NVRAM layout.
- Ability to modify NVRAM variables (e.g., via
efibootmgron Linux orSetFirmwareEnvironmentVariableon Windows).
Exploitation Steps:
- Identify Target: Determine the vulnerable firmware version (InsydeH2O kernel 5.2-5.7).
- Craft Payload: Develop a payload to be written to firmware memory (e.g., SMM code that disables Secure Boot).
- Set NVRAM Variable: Use a kernel-mode driver or privileged OS tool to set the specific NVRAM variable to the address where the payload should be written.
- Trigger Vulnerability: Initiate an S3 suspend/resume cycle or invoke the vulnerable chipset service.
- Achieve Code Execution: The vulnerable driver writes the payload to the attacker-controlled address, executing the malicious firmware code.
Example (Conceptual):
# On a Linux system with kernel access
# Set NVRAM variable to point to a location in SMM code
efibootmgr --set-var AttackerControlledVar -d /dev/sda -p 1 -L 0x12345678
# Trigger S3 sleep
echo mem > /sys/power/state
Blue Team
Detection & Prevention:
- Firmware Integrity Monitoring: Use tools like
fwupdand CHIPSEC to monitor for unauthorized NVRAM variable changes. - Secure Boot: Ensure Secure Boot is enabled and configured to prevent loading of unsigned kernel modules.
- Memory Protections: Enable UEFI memory protections (e.g., NX, page table protections) to limit the impact of arbitrary writes.
- Logging: Monitor system logs for unexpected S3 transitions or firmware variable modifications.
- Patch Management: Apply firmware updates from the OEM as soon as they are available.
Lab Setup for Testing:
- Hardware: A system with a vulnerable InsydeH2O firmware (e.g., certain Lenovo, Dell, or HP laptops).
- Software: CHIPSEC framework for firmware security testing.
- Procedure:
- Use CHIPSEC to scan for known vulnerabilities.
- Attempt to modify NVRAM variables and observe system behavior.
- Verify patch application by checking firmware version.
Indicators of Compromise (IOCs)
- NVRAM Variable Modification: Unexpected changes to NVRAM variables, especially those related to ACPI or chipset services.
- Firmware Memory Anomalies: Unusual writes to firmware memory regions (e.g., SMM code, boot scripts).
- S3 Resume Anomalies: System behavior changes after S3 resume (e.g., Secure Boot disabled, unexpected drivers loaded).
- Firmware Version: Systems running InsydeH2O kernel 5.2 through 5.7 without the patched versions.
- CHIPSEC Alerts: CHIPSEC or similar tools reporting memory corruption or NVRAM variable abuse.
Detection Engineering
YARA Rule
rule CVE_2024_49200_Insyde_NVRAM_Write {
meta:
description = "Detects potential exploitation of CVE-2024-49200 by identifying NVRAM variable reads used as pointers"
author = "Valters IT"
date = "2024-10-27"
reference = "CVE-2024-49200"
strings:
$s1 = "AcpiS3SaveDxe" ascii wide nocase
$s2 = "ChipsetSvcDxe" ascii wide nocase
$s3 = "GetVariable" ascii wide nocase
$s4 = "NVRAM" ascii wide nocase
condition:
(uint16(0) == 0x5A4D) and // MZ header for PE files
(($s1 or $s2) and $s3 and $s4)
}
Sigma Rule
title: Potential Exploitation of CVE-2024-49200 via NVRAM Variable Modification
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects attempts to modify NVRAM variables that could be used to exploit CVE-2024-49200 in InsydeH2O firmware.
author: Valters IT
date: 2024-10-27
logsource:
product: windows
service: system
category: process_creation
detection:
selection:
Image|endswith: '\efibootmgr.exe'
CommandLine|contains: '--set-var'
condition: selection
falsepositives:
- Legitimate firmware updates
level: high
Suricata Rule
alert ip any any -> any any (msg:"CVE-2024-49200 - Potential NVRAM Variable Exploitation"; content:"|00 00 00 00|"; depth:4; offset:0; content:"|FF FF FF FF|"; within:4; reference:cve,2024-49200; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
- Apply Firmware Updates: Contact the OEM (e.g., Lenovo, Dell, HP) and apply the patched firmware version as specified in the advisory:
- Kernel 5.2: Version 05.29.44
- Kernel 5.3: Version 05.38.44
- Kernel 5.4: Version 05.46.44
- Kernel 5.5: Version 05.54.44
- Kernel 5.6: Version 05.61.44
- Kernel 5.7: Version 05.70.44
- Enable Secure Boot: Ensure Secure Boot is enabled to prevent unauthorized code execution at boot time.
- Restrict Physical Access: Limit physical access to systems to prevent direct exploitation.
- Monitor NVRAM Changes: Use tools like
fwupdand CHIPSEC to monitor for unauthorized NVRAM variable modifications. - Implement Kernel Protections: Use kernel hardening techniques (e.g., Kernel Address Space Layout Randomization, Control Flow Integrity) to make exploitation more difficult.
- Vendor Communication: Work with hardware vendors to ensure timely delivery of firmware patches.
Valters IT
DevSecOps & Cyber Threat Intelligence
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.