Windows Print Spooler Remote Code Execution Vulnerability (CVE-2021-34527)
The Windows Print Spooler service improperly performs privileged file operations, allowing an attacker to run arbitrary code with SYSTEM privileges. An attacker could then install programs, view or change data, or create accounts with full user rights.
Originally disclosed on Microsoft
Description
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. 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. 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 ( Note : 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): HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers\PointAndPrint NoWarningNoElevationOnInstall = 0 (DWORD) or not defined (default setting) UpdatePromptSettings = 0 (DWORD) or not defined (default setting) Having NoWarningNoElevationOnInstall set to 1 makes your system vulnerable by design. 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 KB5005010: Restricting installation of new printer drivers after applying the July 6, 2021 updates . 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.
FAQ
If I have not yet installed the security update released Out-of-Band on July 6 and 7, 2021, then do I need to install both the Out-of-Band security update released on July 6 and 7, 2021, and the monthly security updates released on July 13, 2021 to be protected from PrintNightmare? All monthly security updates are cumulative, including the monthly security updates released on July 13, 2021. The July 13, 2021 cumulative security updates contain all previous security fixes - including the security fix for the print spooler vulnerability (CVE-2021-34527). Customers who have not previously deployed the OOB fix released on July 6 and 7, 2021, can skip deploying the OOB update and deploy the July cumulative security updates released on July 13, 2021, to be protected. Is this the vulnerability that has been referred to publicly as PrintNightmare? Yes, Microsoft has assigned CVE-2021-34527 to this vulnerability. Is this vulnerability related to CVE-2021-1675? This vulnerability is similar but distinct from the vulnerability that is assigned CVE-2021-1675. The attack vector is different as well. CVE-2021-1675 was addressed by the security update released on June 8, 2021. Did the June 2021 update introduce this vulnerability? No, the vulnerability existed before the June 8, 2021 security update. All versions of Windows are listed in the Security Updates table. Are all versions vulnerable? All versions of Windows are vulnerable. As of July 7, 2021, Microsoft has released security updates for this vulnerability for all supported versions of Windows listed in the security updates table in this CVE. What vulnerabilities do the security updates released on and after July 6, 2021 address? The security updates released on and after July 6, 2021 contain protections for a remote code execution exploit in the Windows Print Spooler service known as “PrintNightmare”, documented in CVE-2021-34527, as well as for CVE-2021-1675. Are Domain Controllers known to be affected by the vulnerability? Domain controllers are affected if the print spooler service is enabled. Are client systems and member servers that are not domain controllers known to be affected by the vulnerability? Yes. All editions of Windows are affected. How can I see attack activity on my network related to this vulnerability? Security products, like Microsoft 365 Defender, offer different ways to view relevant alerts and telemetry. Microsoft has published our recommendations for seeing this sort of behavior at our GitHub here: Microsoft 365 Defender Hunting Queries . Customers using other technologies can adapt this logic for use in their environments. How is Point and Print technology affected by this particular vulnerability? Point and Print is not directly related to this vulnerability, but certain configurations make systems vulnerable to exploitation. How does Microsoft recommend implementing Point and Print restrictions to help secure my systems? Please see KB5005010: Restricting installation of new printer drivers after applying the July 6, 2021 updates for complete information. How do I assess my Point and Print security posture to determine if my Windows system is affected by this particular configuration? Please see KB5005010: Restricting installation of new printer drivers after applying the July 6, 2021 updates for complete information.
Windows Print Spooler Components
Windows Print Spooler Components
Microsoft
Microsoft
Customer Action Required
Yes
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the Print Spooler service performs privileged file operations without properly validating or restricting them, allowing an attacker to load and execute arbitrary code.
Impact
An attacker could run arbitrary code with SYSTEM privileges, then install programs, view, change, or delete data, or create new accounts with full user rights; all versions of Windows are affected if the print spooler service is enabled.
What the attacker needed
Windows system with Print Spooler enabled; Network access to the target
The fix
Microsoft released security updates on and after July 6, 2021 to address the vulnerability, and also recommends confirming that certain Point and Print registry settings are set to 0 or not defined.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
The print spooler is a Windows background service that manages printing. Because it runs with very high privileges, a flaw in how it handles files lets an attacker make it run their own code as the most powerful user on the machine. This means they could take full control of the computer.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.