CVE-2024-52877
Executive Summary
CVE-2024-52877 is a buffer over-read vulnerability in the InsydeH2O UEFI firmware kernel, specifically within the VariableRuntimeDxe driver. The flaw resides in the CreateVariableLockListInSmm() function, which uses StrSize() to determine the size of a variable name. An attacker with local, high-privileged access (e.g., Ring 0 or SMM) could exploit this to read out-of-bounds memory, potentially leaking sensitive data from the System Management Mode (SMM) region. The vulnerability affects multiple kernel versions (5.2 through 5.7) and requires a firmware update to patch. No public exploit code or proof-of-concept is currently available, but the technical details are clear enough for a determined attacker to weaponize.
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 in a software package manager (NPM, PyPI, Go, Ruby) but in UEFI firmware. The supply chain risk is that OEMs and system integrators must apply the patched kernel versions to their firmware builds. Delays in downstream distribution could leave end-user devices exposed.
CVSS Breakdown & Threat Level
The CVSS score is listed as 0.0, which is likely a placeholder. Based on the vulnerability characteristics, a reasonable assessment would be:
- Attack Vector (AV): Local (L) – requires physical or administrative access.
- Attack Complexity (AC): Low (L) – the function is reachable via standard UEFI variable services.
- Privileges Required (PR): High (H) – requires kernel or SMM-level privileges.
- User Interaction (UI): None (N) – no user action needed beyond exploitation.
- Scope (S): Unchanged (U) – the vulnerable component is the firmware itself.
- Confidentiality (C): High (H) – potential to leak SMM secrets.
- Integrity (I): None (N) – no write capability.
- Availability (A): None (N) – no denial of service.
Estimated CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
Estimated Score: 4.4 (Medium)
Threat Level: Medium. Exploitation requires high privileges, but the impact on confidentiality is significant.
Deep Dive & Mechanics
The vulnerability is in the VariableRuntimeDxe driver, which handles UEFI variable operations. The SmmCreateVariableLockList() callback function calls CreateVariableLockListInSmm(). Inside this function, StrSize() is used to calculate the byte size of a Unicode variable name string. The issue is that StrSize() reads memory until it encounters a null terminator. If the variable name buffer is not properly null-terminated or is smaller than expected, StrSize() will read beyond the allocated buffer, causing a buffer over-read.
Root Cause: The variable name length is not validated before calling StrSize(). An attacker can craft a variable name that lacks a null terminator within the expected buffer, causing StrSize() to read adjacent memory.
Impact: An attacker with SMM privileges (e.g., via a previous exploit) could use this to leak sensitive data from SMRAM, such as cryptographic keys, passwords, or other firmware secrets. This could lead to further compromise of the platform.
Vulnerable vs. Patched Code
The vulnerable code path is in CreateVariableLockListInSmm():
// Vulnerable code (pseudo)
UINTN NameSize = StrSize(VariableName); // No bounds check
The patched code should include a length check:
// Patched code (pseudo)
UINTN MaxNameSize = MAX_VARIABLE_NAME_SIZE; // Define a safe limit
UINTN NameSize = StrSize(VariableName);
if (NameSize > MaxNameSize) {
// Handle error, return
}
The exact patch is not publicly available, but the fix involves validating the variable name size before using StrSize().
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Local administrative access to the system (Ring 0 or SMM).
- Ability to call UEFI runtime services (e.g.,
SetVariableorGetVariable). - Knowledge of the vulnerable driver's GUID and function offsets.
Exploitation Steps:
- Identify the target system's firmware version (e.g., via
dmidecodeor UEFI shell). - Craft a UEFI variable with a name that is not null-terminated within the expected buffer.
- Call
SetVariablewith the crafted name to triggerSmmCreateVariableLockList(). - The
CreateVariableLockListInSmm()function will callStrSize()on the name, reading beyond the buffer. - Capture the leaked data from SMRAM (e.g., via a side-channel or by observing the return value).
No public exploit code is available. A custom UEFI driver or kernel module would be required.
Blue Team (Detection & Defense)
Detection:
- Monitor for unusual UEFI variable operations (e.g., variable names with unexpected lengths).
- Use firmware integrity monitoring tools (e.g., CHIPSEC) to detect SMM call anomalies.
- Enable Secure Boot and TPM-based attestation to prevent unauthorized firmware modifications.
Defense:
- Apply the firmware patch from Insyde or your OEM.
- Restrict physical access to systems.
- Use virtualization-based security (VBS) to isolate SMM.
Indicators of Compromise (IOCs)
- UEFI Variable Names: Variable names with missing null terminators or unusually long strings.
- SMM Call Patterns: Unexpected calls to
SmmCreateVariableLockList()from non-standard contexts. - Memory Leakage: SMRAM regions showing signs of data exfiltration (e.g., repeated reads of the same address).
- Firmware Version: Systems running unpatched kernel versions (5.2 < 05.29.50, etc.).
Detection Engineering
YARA Rule
rule CVE_2024_52877_BufferOverread {
meta:
description = "Detects potential exploitation of CVE-2024-52877 via UEFI variable name over-read"
author = "Valters IT"
date = "2025-04-17"
reference = "CVE-2024-52877"
strings:
$s1 = "CreateVariableLockListInSmm" ascii wide nocase
$s2 = "StrSize" ascii wide nocase
condition:
$s1 and $s2
}
Sigma Rule
title: CVE-2024-52877 UEFI Variable Name Over-Read
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects attempts to exploit a buffer over-read in InsydeH2O firmware by crafting UEFI variable names without null terminators.
author: Valters IT
date: 2025-04-17
logsource:
product: windows
service: uefi
detection:
selection:
EventID: 1 # Example: UEFI variable set event
VariableName|re: '^[^\\x00]*$' # Variable name without null terminator
condition: selection
falsepositives:
- Legitimate variable names that are exactly the buffer size
level: high
Suricata Rule
alert ip any any -> any any (msg:"CVE-2024-52877 UEFI Variable Name Over-Read Attempt"; content:"|00|"; offset:0; depth:1; content:"|00|"; within:256; reference:cve,2024-52877; sid:1000001; rev:1;)
Note: Suricata rules for UEFI exploitation are challenging due to the low-level nature. This rule is a placeholder for network-based detection of related payloads.
Remediation & Mitigation
Immediate Actions:
- Patch Firmware: Update to the fixed kernel versions:
- Kernel 5.2: version 05.29.50 or later
- Kernel 5.3: version 05.38.50 or later
- Kernel 5.4: version 05.46.50 or later
- Kernel 5.5: version 05.54.50 or later
- Kernel 5.6: version 05.61.50 or later
- Kernel 5.7: version 05.70.50 or later
- Contact OEM: If your system uses InsydeH2O, check with the manufacturer for a firmware update.
Long-Term Mitigations:
- Enable Secure Boot and TPM to prevent unauthorized firmware modifications.
- Use hardware-backed attestation (e.g., Intel TXT, AMD SVM) to verify SMM integrity.
- Implement runtime SMM monitoring with tools like CHIPSEC.
Workarounds:
- No effective workaround exists without patching. Disabling UEFI variable services is not practical.
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.