Originally published on CyberNetSec.
Executive Summary
A new zero-day local privilege escalation (LPE) vulnerability, named "LegacyHive," has been publicly disclosed, affecting all supported versions of Microsoft Windows and Windows Server. The flaw, discovered by researcher "Nightmare Eclipse," resides in the Windows User Profile Service. It allows a local attacker with standard user credentials to escalate their privileges to full administrative control. The proof-of-concept (PoC) exploit has been confirmed to be effective. While Microsoft is investigating, security firm ACROS Security has released free, unofficial micropatches through its 0Patch platform to mitigate the immediate risk. This vulnerability presents a significant threat for multi-user environments, as it provides a straightforward path for post-compromise privilege escalation.
Vulnerability Details
The LegacyHive vulnerability is a logic flaw within the Windows User Profile Service. It allows a low-privileged user to manipulate the registry hive of another user, including administrators. The core of the exploit involves mounting another user's registry hive (NTUSER.DAT) with full, unrestricted access. This should not be permissible under normal operating conditions.
The attack vector is as follows:
- An attacker with standard user access on a Windows system leverages the vulnerability to mount an administrator's registry hive.
- With write access to the hive, the attacker modifies specific registry keys, such as those related to startup processes or component object model (COM) registrations within the
HKEY_CURRENT_USER\Software\Classes(classes) hive. - The attacker plants a payload or command that will be executed automatically the next time the targeted administrator logs into the system.
- Upon the administrator's login, the operating system processes the malicious registry entries, executing the attacker's code with administrative privileges.
This technique bypasses standard user account controls and provides a reliable method for privilege escalation. Since it requires local access, it is most likely to be used as a second-stage tool by an attacker who has already gained an initial foothold on a system through other means, such as phishing or exploiting a separate remote code execution flaw.
Affected Systems
The vulnerability is reported to affect all currently supported versions of Windows, including:
- Windows 11 (all versions)
- Windows 10 (all versions)
- Windows Server 2022
- Windows Server 2019
- Windows Server 2016
Given the fundamental nature of the User Profile Service, it is likely that older, unsupported versions of Windows are also affected. The flaw impacts both desktop and server editions, making it a widespread issue for nearly all Windows-based environments.
Exploitation Status
A proof-of-concept (PoC) exploit was publicly released by the researcher, Nightmare Eclipse. Its functionality has been independently verified by other security experts, confirming that it works as described. As of July 21, 2026, there are no reports of this vulnerability being actively exploited in the wild. However, the public availability of a working PoC significantly increases the likelihood of its adoption by threat actors. Attackers can easily integrate this LPE technique into their existing toolkits to enhance post-exploitation capabilities.
Impact Assessment
The primary impact of the LegacyHive vulnerability is Privilege Escalation. An attacker who successfully exploits this flaw can elevate their access from a standard user to NT AUTHORITY\SYSTEM, the highest level of privilege on a Windows system. This level of access allows an attacker to:
- Disable security software (antivirus, EDR).
- Install persistent backdoors, rootkits, or other malware.
- Exfiltrate sensitive data from the system.
- Move laterally across the network to compromise other systems.
- Create or modify user accounts.
In a corporate environment, this could lead to a full domain compromise if the attacker gains SYSTEM-level access on a critical server like a Domain Controller. The business impact includes potential data breaches, deployment of ransomware, and complete loss of control over the affected infrastructure.
Cyber Observables — Hunting Hints
The following patterns may help identify vulnerable or compromised systems:
| Type | Value | Description |
|---|---|---|
| Process Name | userprof.dll |
Monitor for anomalous behavior or unexpected processes being spawned by the User Profile Service library. |
| Registry Key | HKEY_USERS\<SID>_classes\ |
Monitor for write operations to this registry hive by processes running under a different user's context. |
| Log Source | Windows Security Event Log | Look for Event ID 4657 (A registry value was modified) with unusual subject/object user pairings, especially targeting administrator hives. |
| Command Line | reg load |
Suspicious use of the reg load command by non-administrative users to mount registry hives. |
Detection Methods
Security teams can hunt for potential exploitation by focusing on registry and process monitoring. (D3FEND: Process Analysis, System File Analysis)
Endpoint Detection and Response (EDR): Configure EDR solutions to alert on any process attempting to write to a registry hive (
NTUSER.DAT) that does not belong to the process's current user context. Create rules to detect suspicious child processes spawned from services handling user profiles.-
SIEM/Log Analysis: Ingest Windows Security Event Logs and search for patterns of abuse. A query could look for a standard user process (
SubjectUserName) modifying registry keys belonging to an administrative user (ObjectNamecontains an admin's SID).
# Example PowerShell snippet to check for loaded hives Get-ChildItem -Path Registry::HKEY_USERS | ForEach-Object { $sid = $_.PSChildName # Check if the SID corresponds to a known user and if it's loaded by an unexpected process # Further logic required here to correlate with running processes } File Integrity Monitoring (FIM): While difficult to implement at scale for user hives, FIM on critical servers could be configured to monitor for unauthorized modifications to
NTUSER.DATfiles for administrator accounts.
Remediation Steps
As of July 21, 2026, Microsoft has not released an official patch. The following actions are recommended:
Apply Unofficial Micropatch (Immediate): For organizations comfortable with third-party patches, deploying the free micropatch from 0Patch is the most direct way to mitigate the vulnerability. This can serve as a critical stopgap until an official update is available. (D3FEND: Software Update)
Principle of Least Privilege (Strategic): Enforce the principle of least privilege rigorously. Ensure that users operate with the minimum permissions necessary for their roles. This won't prevent exploitation by a user who already has local access but limits the initial attack surface. (D3FEND: User Account Permissions)
Monitor for Exploitation (Continuous): Implement the detection strategies outlined above to hunt for signs of compromise. Prioritize monitoring on multi-user systems like terminal servers and critical infrastructure.
Await Official Patch: Monitor communications from Microsoft for the release of an official security update and prepare to deploy it on an emergency basis once available.
Top comments (0)