Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
PrintNightmare is a flaw in the Windows Print Spooler that let any authenticated user install a malicious printer driver and run code as SYSTEM, including on domain controllers.

What Is PrintNightmare?
PrintNightmare, tracked as CVE-2021-34527, is a remote code execution vulnerability in the Windows Print Spooler service. Any authenticated domain user could instruct a remote machine—including a domain controller—to install a printer driver of their choosing, and because the spooler runs as SYSTEM, that driver executed with full local privileges. It was one of the most disruptive Windows vulnerabilities of 2021, and the way it became public made it considerably worse.
Microsoft patched CVE-2021-1675 on 8 June 2021, describing it as a local privilege escalation in the spooler. On 29 June, researchers at the Chinese security firm Sangfor published a proof of concept, believing the flaw had already been fixed. It had not: their exploit targeted a different code path, RpcAddPrinterDriverEx, which permitted remote exploitation. The repository was deleted within hours, but the code had already been forked widely.
Microsoft assigned a new identifier, CVE-2021-34527, on 1 July and shipped an out-of-band patch on 6 July. That patch proved incomplete for systems where Point and Print was configured permissively, and further changes followed in August 2021, when Microsoft altered default behaviour so that installing or updating a printer driver requires administrator rights. A related spooler flaw, CVE-2021-36958, continued the sequence.
The spooler is a remarkable piece of legacy. It runs by default on every Windows installation, including servers that have never printed anything, it is reachable over RPC and SMB named pipes, it runs as SYSTEM, and its entire purpose is to accept and load code—printer drivers—supplied by other machines. The protocol dates to an era when any domain-joined computer was considered reasonably trustworthy.
On a domain controller the impact is immediate. Code execution as SYSTEM on a domain controller is domain compromise, with no further escalation required. That is what moved PrintNightmare from a serious bug to an emergency, and why the NCSC and CISA both issued urgent guidance in early July 2021.
The attack is straightforward enough to script. The attacker, holding any valid domain credentials, hosts a malicious DLL on an SMB share they control, then calls the spooler’s driver installation method on the target, pointing at that path. The spooler fetches the DLL and loads it as SYSTEM. Public implementations in Impacket and PowerShell reduced this to a single command.
Ransomware groups adopted it quickly—Vice Society and Magniber were both observed using PrintNightmare for privilege escalation and lateral movement during 2021. It remains in the CISA Known Exploited Vulnerabilities catalogue, and unpatched spoolers still turn up during internal testing.
RestrictDriverInstallationToAdministrators registry value, and leave it at the secure default.Spooler operations are logged if you turn them on. The Microsoft-Windows-PrintService/Admin and /Operational channels record driver installations, and event ID 316 in the operational log corresponds to a driver being added. A driver installation on a domain controller, or from an unexpected source path, is an alert worth building. Supporting signals include spoolsv.exe spawning child processes or loading a DLL from a UNC path, both of which are visible in Sysmon.
PrintNightmare belongs with PetitPotam, the AD CS ESC issues, and Zerologon in a run of 2020 and 2021 findings that shared a theme: core Active Directory services designed decades ago extend trust in ways that no longer match how networks are attacked. Disabling services you do not use, and reducing what an ordinary domain account can reach, protects against the next one of these as well as this one.
At Privia Security, our Infrastructure and Architecture Review Services include a domain controller hardening review against exactly these baselines.
Yes, in almost every environment. Domain controllers do not need to print, and Microsoft’s security baselines recommend disabling the service there. The only common exception involves legacy printer pruning in Active Directory, which most organisations no longer use. Test in a maintenance window, confirm no printer management role depends on it, and leave the service disabled thereafter.
No. The out-of-band update of 6 July 2021 addressed the remote code execution path but could be bypassed where Point and Print was configured to allow non-administrators to install drivers. Microsoft changed the default in August 2021 so that driver installation requires administrator rights. Systems that had the registry value set permissively remained exploitable until that change was applied.
Any valid domain user account, with no special rights. That low bar is what made the vulnerability so serious: a single phished credential, a shared service account, or a compromised contractor login was enough to reach SYSTEM on a domain controller. It is a good illustration of why ordinary user accounts must be treated as a meaningful level of access, not as harmless.
Query the service state across the estate with a configuration management tool or a simple remote PowerShell sweep, then check the RestrictDriverInstallationToAdministrators and Point and Print registry values on anything where the spooler is running. Public testing scripts can confirm exploitability with authorisation, and an internal penetration test will identify remaining spoolers on servers as a matter of routine.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.