What is Active Directory Domain Services?
Active Directory Domain Services (AD DS) is Microsoft's directory service that provides authentication and authorization for Windows networks. Every corporate Windows environment relies on AD DS: it manages user accounts, computer accounts, group memberships, and Kerberos/NTLM authentication. The Domain Controller (DC) is the server running AD DS and is the crown jewel of a Windows network — whoever controls the DC controls every machine, account, and resource in the domain. Machine accounts (computer accounts) are objects in AD representing domain-joined computers; they follow a naming convention where the account name ends with a dollar sign (e.g., WORKSTATION1$) and unlike user accounts, low-privileged domain users can create machine accounts by default (up to the ms-DS-MachineAccountQuota limit, defaulting to 10).
Overview
CVE-2021-42278 is a privilege escalation vulnerability in Active Directory Domain Services. It is the first stage of the NoPac attack chain (combined with CVE-2021-42287), which allows a standard domain user account to escalate to Domain Administrator — the highest privilege in a Windows domain. The vulnerability stems from a missing security check in Active Directory: the sAMAccountName attribute of a machine account (computer account) can be set to a value that matches a Domain Controller's account name, without the trailing $ dollar sign. Active Directory does not enforce that machine account names must differ from DC names. This sAMAccountName spoofing enables a domain user to create a machine account, rename it to impersonate a DC, and then use that impersonation in Kerberos authentication requests in combination with CVE-2021-42287.
Microsoft patched this in November 2021 Patch Tuesday. CISA added it to KEV in April 2022 after confirmed exploitation in ransomware campaigns.
Affected Versions
| Product | Vulnerable | Fixed |
|---|---|---|
| Windows Server 2008 R2 SP1 | Yes | November 2021 cumulative update |
| Windows Server 2012 / 2012 R2 | Yes | November 2021 cumulative update |
| Windows Server 2016 | Yes | November 2021 cumulative update |
| Windows Server 2019 | Yes | November 2021 cumulative update |
| Windows Server 2022 | Yes | November 2021 cumulative update |
Technical Details
CVE-2021-42278 enables the first stage of the NoPac domain escalation chain:
- Root cause: Active Directory does not validate that a machine account's
sAMAccountNameattribute is distinct from a Domain Controller'ssAMAccountName— a domain user can rename a machine account they control to match a DC's account name (e.g., renameATTACKER$toDC1, matching the domain controller's accountDC1$without the dollar sign) - Machine account creation: By default, any authenticated domain user can create up to 10 machine accounts (
ms-DS-MachineAccountQuota). This requires onlyPR:L(low-privileged domain account) - sAMAccountName spoofing: The attacker creates a machine account, then uses the LDAP API to rename the account's
sAMAccountNameto match the DC name without the$suffix (e.g., changeEVILPC$toDC01). Active Directory allows this change without restriction - Attack Complexity: High: The chain requires specific timing and steps — creating a machine account, renaming it, requesting a TGT, then renaming it back and using CVE-2021-42287 — but automated tooling (
nopac.py) made this trivial - Chain dependency: CVE-2021-42278 alone provides impersonation; the full domain privilege escalation requires chaining with CVE-2021-42287 (Kerberos PAC escalation)
Discovery
The NoPac attack chain was researched and disclosed by security researchers in December 2021, shortly after the November patches. Andrew Bartlett and others in the open-source Samba/AD community contributed to the analysis. The full NoPac exploit chain was published as open-source tooling on December 11, 2021, making the attack accessible to any attacker with a low-privileged domain account.
Exploitation Context
The NoPac chain (CVE-2021-42278 + CVE-2021-42287) is particularly dangerous because it enables domain user to Domain Admin in a single attack chain — one of the most severe possible privilege escalation outcomes in a Windows environment. After the public nopac.py tool release in December 2021, this became a standard tool in ransomware operators' post-compromise playbooks. CISA added both CVEs to KEV in April 2022, confirming active use in ransomware intrusions. Unpatched domain controllers in environments with default ms-DS-MachineAccountQuota settings (which allow machine account creation) remain vulnerable.
Remediation
- Apply November 2021 cumulative update to all Domain Controllers via Windows Update (KB5008102 for Server 2019 or equivalent)
- Both CVE-2021-42278 and CVE-2021-42287 must be patched to fully break the NoPac attack chain
- As a defense-in-depth measure, set
ms-DS-MachineAccountQuotato 0 in Active Directory to prevent regular users from creating machine accounts (requires administrative process for computer account joins):Set-ADDomain -Identity domain.local -Replace @{"ms-DS-MachineAccountQuota"="0"} - Monitor Active Directory for machine account renames — especially changes to
sAMAccountNameattributes that remove the$suffix - Deploy Microsoft Defender for Identity (formerly Azure ATP) with alerts enabled for suspicious Kerberos activity
- Review machine account creation logs: Event ID 4741 (computer account created) and 4742 (computer account changed)
Key Details
| Property | Value |
|---|---|
| CVE ID | CVE-2021-42278 |
| Vendor / Product | Microsoft — Active Directory |
| NVD Published | 2021-11-10 |
| NVD Last Modified | 2025-10-30 |
| CVSS 3.1 Score | 7.5 |
| CVSS 3.1 Vector | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Severity | HIGH |
| CISA KEV Added | 2022-04-11 |
| CISA KEV Deadline | 2022-05-02 |
| Known Ransomware Use | ⚠️ Yes |
CVSS 3.1 Breakdown
Required Action
Timeline
| Date | Event |
|---|---|
| 2021-11-09 | Microsoft patches CVE-2021-42278 in November 2021 Patch Tuesday |
| 2021-11-10 | CVE published |
| 2021-12-11 | NoPac exploit tool published publicly — CVE-2021-42278 + CVE-2021-42287 chain enabling domain user to Domain Admin |
| 2022-04-11 | Added to CISA Known Exploited Vulnerabilities catalog |
| 2022-05-02 | CISA BOD 22-01 remediation deadline |
References
| Resource | Type |
|---|---|
| Microsoft Security Response Center — CVE-2021-42278 | Vendor Advisory |
| Secureworks — Privilege Escalation via NoPac (CVE-2021-42278 + CVE-2021-42287) | Security Research |
| NVD — CVE-2021-42278 | Vulnerability Database |
| CISA KEV Catalog Entry | US Government |