CVE-2021-34527 in Windows (PrintNightmare)
Summary
by MITRE • 07/03/2021
<p>A remote code execution vulnerability exists when the Windows Print Spooler service improperly performs privileged file operations. An attacker who successfully exploited this vulnerability could run arbitrary code with SYSTEM privileges. An attacker could then install programs; view, change, or delete data; or create new accounts with full user rights.</p> <p>UPDATE July 7, 2021: The security update for Windows Server 2012, Windows Server 2016 and Windows 10, Version 1607 have been released. Please see the Security Updates table for the applicable update for your system. We recommend that you install these updates immediately. If you are unable to install these updates, see the FAQ and Workaround sections in this CVE for information on how to help protect your system from this vulnerability.</p> <p>In addition to installing the updates, in order to secure your system, you must confirm that the following registry settings are set to 0 (zero) or are not defined (<strong>Note</strong>: These registry keys do not exist by default, and therefore are already at the secure setting.), also that your Group Policy setting are correct (see FAQ):</p> <ul> <li>HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers\PointAndPrint</li> <li>NoWarningNoElevationOnInstall = 0 (DWORD) or not defined (default setting)</li> <li>UpdatePromptSettings = 0 (DWORD) or not defined (default setting)</li> </ul> <p><strong>Having NoWarningNoElevationOnInstall set to 1 makes your system vulnerable by design.</strong></p> <p>UPDATE July 6, 2021: Microsoft has completed the investigation and has released security updates to address this vulnerability. Please see the Security Updates table for the applicable update for your system. We recommend that you install these updates immediately. If you are unable to install these updates, see the FAQ and Workaround sections in this CVE for information on how to help protect your system from this vulnerability. See also <a href="https://support.microsoft.com/topic/31b91c02-05bc-4ada-a7ea-183b129578a7">KB5005010: Restricting installation of new printer drivers after applying the July 6, 2021 updates</a>.</p> <p>Note that the security updates released on and after July 6, 2021 contain protections for CVE-2021-1675 and the additional remote code execution exploit in the Windows Print Spooler service known as “PrintNightmare”, documented in CVE-2021-34527.</p>
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
Analysis
by VulDB Data Team • 12/17/2025
The vulnerability identified as CVE-2021-34527 represents a critical remote code execution flaw within the Windows Print Spooler service that operates under the privilege level of SYSTEM. This issue stems from improper handling of privileged file operations, creating an exploitable condition that allows unauthenticated attackers to execute arbitrary code on affected systems. The vulnerability specifically targets the Windows Print Spooler service which is responsible for managing print jobs and printer drivers, making it a prime target for attackers seeking to gain elevated privileges. According to the Common Weakness Enumeration framework, this vulnerability maps to CWE-22, which describes improper limitation of a pathname to a restricted directory, commonly known as path traversal attacks. The flaw allows an attacker to manipulate the print spooler service into executing malicious code with the highest level of system privileges, potentially enabling full system compromise.
The operational impact of CVE-2021-34527 extends far beyond simple remote code execution, as successful exploitation provides attackers with complete control over affected systems. Once an attacker gains SYSTEM-level access through this vulnerability, they can install programs, modify or delete critical data, and create new user accounts with full administrative rights. This comprehensive access capability makes the vulnerability particularly dangerous in enterprise environments where print servers often serve as central points of access. The vulnerability affects multiple Windows versions including Windows Server 2012, Windows Server 2016, and Windows 10 Version 1607, making it a widespread concern across various deployment scenarios. The exploitation mechanism relies on the Print Spooler service's handling of printer driver installations, where attackers can manipulate the service to load malicious drivers or execute code during the installation process.
Microsoft's response to this vulnerability included the release of security updates on July 6, 2021, which addressed the flaw in the Windows Print Spooler service. These updates specifically target the privilege escalation issue that allows attackers to execute code with SYSTEM privileges, effectively closing the attack vector. The security patches not only fix the immediate vulnerability but also incorporate protections against related exploits including CVE-2021-1675, which is another remote code execution vulnerability affecting the print spooler service. Organizations are strongly advised to install these updates immediately, as the vulnerability has been actively exploited in the wild. Microsoft's guidance emphasizes that the vulnerability can be mitigated through proper configuration of registry settings, particularly within the PointAndPrint registry keys. The registry keys HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers\PointAndPrint must be configured with NoWarningNoElevationOnInstall and UpdatePromptSettings set to 0 or not defined to prevent exploitation. This configuration prevents automatic elevation of privileges during printer driver installations, which is a key aspect of the vulnerability's exploitation mechanism.
The recommended mitigations for CVE-2021-34527 extend beyond simple patching to include comprehensive system hardening measures. Organizations should ensure that their Group Policy settings align with the secure configuration recommendations, particularly regarding printer driver installation controls. The registry configuration prevents automatic privilege elevation during driver installations, which is essential since having NoWarningNoElevationOnInstall set to 1 creates an inherent vulnerability by design. Additionally, network segmentation and access controls should be implemented to limit exposure of print servers to untrusted networks. The vulnerability demonstrates the importance of principle of least privilege and proper service configuration in preventing privilege escalation attacks. According to the MITRE ATT&CK framework, this vulnerability maps to techniques involving privilege escalation and persistence, specifically targeting the Windows Print Spooler service as a means to establish persistent access. Organizations should also implement monitoring solutions to detect suspicious print spooler activities and driver installation attempts, as these activities can serve as indicators of exploitation attempts. The vulnerability highlights the critical need for maintaining up-to-date security patches and implementing proper configuration management practices across all Windows systems to prevent similar attacks in the future.