What is the Windows SAM Database and VSS?
The Security Account Manager (SAM) database is a Windows registry hive that stores local user account credentials as password hashes. The SYSTEM hive contains the SYSKEY boot key used to encrypt the SAM, and the SECURITY hive contains cached domain credentials and LSA secrets. Together, these three hives contain the credential material needed to extract all local account password hashes — including the local administrator account. Under normal circumstances, these files are locked by Windows and readable only by SYSTEM. Volume Shadow Copy Service (VSS) creates point-in-time backup snapshots of the system drive. If VSS creates shadow copies that include the registry hives with overly-permissive ACLs, non-privileged users can read the credential files from the shadow copy path.
Overview
CVE-2021-36934, publicly called HiveNightmare or SeriousSAM, is a Windows privilege escalation vulnerability where incorrect Access Control Lists on the SAM, SYSTEM, and SECURITY registry hives in Volume Shadow Service (VSS) shadow copies allow low-privileged users to read these files. A low-privileged user can extract the SAM hive from a shadow copy, dump all local account password hashes, crack or pass the hashes to escalate to local administrator, and then to SYSTEM. This affects Windows 10 version 1809 and later where system shadow copies exist. Security researcher Jonas Lykkegaard (@jonasLyk) disclosed this publicly on July 19, 2021; Microsoft issued a patch in August 2021 Patch Tuesday. CISA added it to the KEV catalog in February 2022.
Affected Versions
| Product | Vulnerable | Fixed |
|---|---|---|
| Windows 10 version 1809 and later | Yes | August 2021 Patch Tuesday |
| Windows 11 | Yes | August 2021 Patch Tuesday |
| Windows Server 2019 | Yes (if VSS shadow copies exist) | August 2021 Patch Tuesday |
Technical Details
- Root cause: Overly permissive ACLs on the SAM, SYSTEM, and SECURITY registry hives in VSS shadow copies — Windows 10 (version 1809+) changed the permissions on these registry hive files, inadvertently granting the built-in BUILTIN\Users group read access in VSS shadow copies
- Shadow copy access path: The shadow copies are accessible via
\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopyX\Windows\System32\config\— a path that bypasses the live registry lock; any low-privileged user can read the SAM, SYSTEM, and SECURITY hives from this path if shadow copies exist - Credential extraction: Using tools like
reg saveorsecretsdump.py(Impacket), an attacker copies the three hive files and extracts all local account NTLM hashes — including the built-in Administrator account hash - Pass-the-hash escalation: The extracted NTLM hash for the local Administrator account can be used in a Pass-the-Hash attack to authenticate as local admin, and from there to SYSTEM
- Prerequisite: VSS shadow copies must exist on the system drive — present on most Windows 10/Server installations with System Restore enabled or backup solutions configured
- No elevated privileges needed: CVSS PR:L — any local account (standard user, service account, limited user) can perform the shadow copy read
Discovery
Discovered by security researcher Jonas Lykkegaard (@jonasLyk), who posted the finding on Twitter on July 19, 2021. Within 24 hours, multiple researchers had published proof-of-concept tools demonstrating credential extraction. Microsoft acknowledged the vulnerability the same day and issued interim mitigations while developing the permanent patch released in August 2021 Patch Tuesday.
Exploitation Context
HiveNightmare quickly entered post-exploitation toolkits because it provides a straightforward and reliable path to local credential material without requiring any kernel exploit — just file system access to the shadow copies. Attackers who gain any local foothold (via phishing, credential stuffing against a service account, or RDP brute force) can immediately extract local admin hashes. With local admin credentials, attackers can disable defenses, access other systems using the same local admin password (if not randomized via LAPS), and move laterally through environments where the same local administrator password is reused. The February 2022 CISA KEV addition reflects confirmed exploitation six months after the patch, consistent with incorporation into commercial post-exploitation frameworks.
Remediation
- Apply August 2021 Patch Tuesday updates — permanently fixes the SAM ACLs in shadow copies
- Interim mitigation (pre-patch): Restrict access to the VSS shadow copy paths:
icacls %windir%\system32\config\*.* /inheritance:e - Delete existing shadow copies after applying the patch — historical shadow copies with the incorrect ACLs remain exploitable until removed:
vssadmin delete shadows /all /quiet - Enable Windows Local Administrator Password Solution (LAPS) to ensure unique local admin passwords on each Windows system, preventing lateral movement even if hashes are extracted
- Verify System Restore and VSS are configured appropriately — disable if not required; new shadow copies created after the patch will have correct ACLs
- Review local account membership: limit which accounts have local logon rights; service accounts should not have interactive logon rights
Key Details
| Property | Value |
|---|---|
| CVE ID | CVE-2021-36934 |
| Vendor / Product | Microsoft — Windows |
| NVD Published | 2021-07-22 |
| NVD Last Modified | 2026-02-25 |
| CVSS 3.1 Score | 7.8 |
| CVSS 3.1 Vector | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Severity | HIGH |
| CISA KEV Added | 2022-02-10 |
| CISA KEV Deadline | 2022-02-24 |
| Known Ransomware Use | No |
CVSS 3.1 Breakdown
Required Action
Timeline
| Date | Event |
|---|---|
| 2021-07-19 | Security researcher Jonas Lykkegaard (@jonasLyk) discloses HiveNightmare on Twitter — demonstrates that Windows 10 VSS shadow copies make SAM/SYSTEM/SECURITY files readable by standard users |
| 2021-07-20 | Microsoft acknowledges the vulnerability and issues initial mitigation guidance; proof-of-concept tools published by multiple researchers |
| 2021-07-22 | CVE-2021-36934 published; also named HiveNightmare and SeriousSAM |
| 2021-08-10 | Microsoft releases permanent patch in August 2021 Patch Tuesday |
| 2022-02-10 | Added to CISA Known Exploited Vulnerabilities catalog |
| 2022-02-24 | CISA BOD 22-01 remediation deadline |
References
| Resource | Type |
|---|---|
| Microsoft Security Advisory — CVE-2021-36934 | Vendor Advisory |
| NVD — CVE-2021-36934 | Vulnerability Database |
| CISA KEV Catalog Entry | US Government |