<< Back
CVE Number Vulnerability Product Severity Date
CVE-2021-34527 Windows Print Spooler Remote Code Execution Vulnerability Windows 10 Critical 12-07-2021

Technical Information

Brief overview of the risk:

Also known as PrintNightmare, is a Remote Code Execution(RCE) vulnerability. This vulnerability is caused when Windows Print Spooler service performs improper privileged file operations. An attacker who successfully exploited this vulnerability could run arbitrary code with SYSTEM privileges.

Technical Details:

Print Spooler is responsible for managing all requests related to printing. Applications use the spooler to queue-up a series of documents and then print them out in the background. By default the print spooler service is enabled on all Windows-based systems, including domain controllers and computers with system admin privileges.

The vulnerability stems from a functionality of the print spooler service through which an user with any low-level privilege can add a new printer remotely. The spooler service makes use of two RPC protocols namely, RpcAsyncAddPrinterDriver() and RpcAddPrinterDriverEx() . These two protocols require multiple parameters including

  • pDataFile
  • pConfigFile
  • pDriverPath

to add the new printer. When adding a new printer, the spooler service checks if the pDataFile’s and pDriverPath’s path is not a UNC(Universal Naming Convention) path. But this check is not done for pConfigFile’s path as a result the file given to pConfigFile is copied to %SYSTEMROOT%\system32\spool\drivers\x64\3\ (on x64 versions of the OS) location.
The logic is written in such a way that if a new printer is added next time giving this file path, it bypasses UNC path check and loads that DLL.
This location is not a valid UNC path so next time when adding a new printer if this file is given as the pDataFile parameter the UNC path check can be bypassed.

This vulnerability can be exploited by an attacker to gain Remote Code Execution on the target machine. CVE-2021-1675 is also similar to this vulnerability but it is a local Elevation of Privilege and requires an authenticated user to exploit the vulnerability.

This vulnerability is seen exploited in the wild, we urge users to patch their systems to the latest update. Here are some recommendations

Recommendations:

  • Update your patch for the vulnerability here
  • Disable printer spooler service if not needed
  • Disable inbound remote printing in your group policy

Affected Software

Windows Server 2012 R2 (Server Core installation)
Windows Server 2012 R2
Windows Server 2012 (Server Core installation)
Windows Server 2012
Windows Server 2008 R2 for x64-based Systems Service Pack 1 (Server Core installation)
Windows Server 2008 R2 for x64-based Systems Service Pack 1
Windows Server 2008 for x64-based Systems Service Pack 2 (Server Core installation)
Windows Server 2008 for x64-based Systems Service Pack 2
Windows Server 2008 for 32-bit Systems Service Pack 2 (Server Core installation)
Windows Server 2008 for 32-bit Systems Service Pack 2
Windows RT 8.1
Windows 8.1 for x64-based systems
Windows 8.1 for 32-bit systems
Windows 7 for x64-based Systems Service Pack 1
Windows 7 for 32-bit Systems Service Pack 1
Windows Server 2016 (Server Core installation)
Windows Server 2016
Windows 10 Version 1607 for x64-based Systems
Windows 10 Version 1607 for 32-bit Systems
Windows 10 for x64-based Systems
Windows 10 for 32-bit Systems
Windows Server, version 20H2 (Server Core Installation)
Windows 10 Version 20H2 for ARM64-based Systems
Windows 10 Version 20H2 for 32-bit Systems
Windows 10 Version 20H2 for x64-based Systems
Windows Server, version 2004 (Server Core installation)
Windows 10 Version 2004 for x64-based Systems
Windows 10 Version 2004 for ARM64-based Systems
Windows 10 Version 2004 for 32-bit Systems
Windows 10 Version 21H1 for 32-bit Systems
Windows 10 Version 21H1 for ARM64-based Systems
Windows 10 Version 21H1 for x64-based Systems
Windows 10 Version 1909 for ARM64-based Systems
Windows 10 Version 1909 for x64-based Systems
Windows 10 Version 1909 for 32-bit Systems
Windows Server 2019 (Server Core installation)
Windows Server 2019
Windows 10 Version 1809 for ARM64-based Systems
Windows 10 Version 1809 for x64-based Systems
Windows 10 Version 1809 for 32-bit Systems