Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is PrintNightmare?

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.

Illustration for the cybersecurity term PrintNightmare
Home / Blog / Cybersecurity Terms / What Is PrintNightmare?
17 November 2026

What Is PrintNightmare?

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.

The Accidental Disclosure

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.

Why the Print Spooler

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.

How It Was Exploited

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.

Hardening the Spooler

  1. Disable the Print Spooler service where it is not needed. On domain controllers this should be the default position; Microsoft’s own security baselines recommend it. The same applies to most member servers.
  2. Apply all spooler patches, including the August 2021 updates, not only the July out-of-band fix.
  3. Restrict driver installation to administrators through the RestrictDriverInstallationToAdministrators registry value, and leave it at the secure default.
  4. Configure Point and Print restrictions so that clients do not silently accept drivers from arbitrary servers, and specify an allow list of approved print servers.
  5. Block inbound SMB and RPC from workstations to servers that have no reason to accept them, which limits how the driver payload can be reached.
  6. Consider removing the dependency entirely by moving to Windows Protected Print or a cloud print service, which avoids third-party drivers on endpoints.

Detection

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.

The Broader Point

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.

FAQ – Frequently Asked Questions

Is Disabling the Print Spooler Safe on a Domain Controller?

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.

Did the July 2021 Patch Fix PrintNightmare Completely?

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.

What Privileges Does an Attacker Need?

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.

How Do We Check Whether Our Spoolers Are Still Exposed?

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.

Related Terms

You May Be Interested In These

What Is the HTTP/2 Rapid Reset Attack?

Cybersecurity Terms

17 November 2026

What Is the HTTP/2 Rapid Reset Attack?

Read More
What Is a Data Diode?

Cybersecurity Terms

17 November 2026

What Is a Data Diode?

Read More
What Is Renovate?

Cybersecurity Terms

17 November 2026

What Is Renovate?

Read More