CVE-2021-34527:Windows Print Spooler Remote Code Execution Vulnerability (PrintNightmare)

splash
Back

Description Preview

A remote code execution vulnerability exists in the Windows Print Spooler service that improperly performs privileged file operations. This vulnerability, known as "PrintNightmare," allows attackers to execute arbitrary code with SYSTEM privileges, enabling them to install programs, view/modify/delete data, or create accounts with full user rights. The vulnerability affects multiple Windows versions and requires immediate patching.

Overview

The PrintNightmare vulnerability (CVE-2021-34527) is a critical security flaw in the Windows Print Spooler service that allows attackers to remotely execute code with SYSTEM privileges. The vulnerability stems from the Print Spooler service improperly handling privileged file operations. This vulnerability gained significant attention as it was actively exploited in the wild and affected virtually all Windows systems with the Print Spooler service enabled. The issue is particularly dangerous because it can be exploited remotely by authenticated users to gain complete system control. Even after patching, certain registry configurations can leave systems vulnerable by design, specifically when Point and Print settings bypass security prompts.

Remediation

  1. Install the security updates released by Microsoft immediately. Updates were released on July 6, 2021, with additional updates for Windows Server 2012, Windows Server 2016, and Windows 10 Version 1607 released on July 7, 2021.

  2. Verify registry settings are secure:

    • Ensure the following registry keys are set to 0 or not defined (default): HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers\PointAndPrint
      • NoWarningNoElevationOnInstall = 0 (DWORD) or not defined
      • UpdatePromptSettings = 0 (DWORD) or not defined
  3. If updates cannot be installed immediately, implement the following workarounds:

    • Disable the Print Spooler service
    • Disable inbound remote printing through Group Policy
    • Block TCP ports used for printing (typically port 445)
  4. Review KB5005010 for guidance on restricting installation of new printer drivers after applying the July 2021 updates.

  5. Ensure Group Policy settings are configured correctly to prevent Point and Print functionality from bypassing security prompts.

References

  1. Microsoft Security Advisory: https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2021-34527
  2. PrintNightmare Exploit Information: http://packetstormsecurity.com/files/167261/Print-Spooler-Remote-DLL-Injection.html
  3. Detection Script: https://www.vicarius.io/vsociety/posts/cve-2021-34527-printnightmare-detection-script
  4. Mitigation Script: https://www.vicarius.io/vsociety/posts/cve-2021-34527-printnightmare-mitigation-script
  5. KB5005010: Restricting installation of new printer drivers: https://support.microsoft.com/topic/31b91c02-05bc-4ada-a7ea-183b129578a7

Early Warning

Customers using Armis Early Warning were notified about this vulnerability before it appeared in CISA's Known Exploited Vulnerabilities Catalog, enabling them to assess their exposure and act proactively. Armis offers these examples of CVEs already included in CISA KEV for potential customers. Click here to learn how to receive alerts earlier.

Armis Alert Date
Jul 2, 2021
CISA KEV Date
Nov 3, 2021
124days early

Industry ExposureMost to least
This section illustrates the prevalence of a specific Common Vulnerabilities and Exposures (CVE) across various industries based on customer reports. The ranking displays industries from the most to least affected by this particular vulnerability, offering valuable insight into where this CVE has been most frequently observed. This information can help organizations within these sectors prioritize their security efforts, understand their relative risk exposure compared to their peers, and focus remediation strategies where they are most needed. By understanding the industry-specific impact, organizations can make more informed decisions regarding patching, resource allocation, and overall risk management related to this CVE.

  1. Public Administration: Medium
    Public Administration
  2. Manufacturing: Medium
    Manufacturing
  3. Health Care & Social Assistance: Medium
    Health Care & Social Assistance
  4. Educational Services: Medium
    Educational Services
  5. Transportation & Warehousing: Medium
    Transportation & Warehousing
  6. Finance and Insurance: Medium
    Finance and Insurance
  7. Retail Trade: Medium
    Retail Trade
  8. Arts, Entertainment & Recreation: Medium
    Arts, Entertainment & Recreation
  9. Professional, Scientific, & Technical Services: Medium
    Professional, Scientific, & Technical Services
  10. Utilities: Medium
    Utilities
  11. Other Services (except Public Administration): Low
    Other Services (except Public Administration)
  12. Information: Low
    Information
  13. Management of Companies & Enterprises: Low
    Management of Companies & Enterprises
  14. Accommodation & Food Services: Low
    Accommodation & Food Services
  15. Agriculture, Forestry Fishing & Hunting: Low
    Agriculture, Forestry Fishing & Hunting
  16. Mining: Low
    Mining
  17. Real Estate Rental & Leasing: Low
    Real Estate Rental & Leasing
  18. Construction: Low
    Construction
  19. Administrative, Support, Waste Management & Remediation Services: Low
    Administrative, Support, Waste Management & Remediation Services
  20. Wholesale Trade: Low
    Wholesale Trade

Focus on What Matters

  1. See Everything.
  2. Identify True Risk.
  3. Proactively Mitigate Threats.

Let's talk!

background