Security teams are assessing the potential for compromise through a remote code execution (RCE) vulnerability in Windows Print Spooler after proof-of-concept (PoC) code for the bug – listed as CVE-2021-1675 and dubbed PrintNightmare – was published to GitHub at the end of June by researchers from China-based Sangfor.
The release of the code was apparently somewhat accidental on Sangfor’s part. According to reports, the Sangfor team rushed publication of the PoC after another firm published a .gif file showing an exploit for CVE-2021-1675.
Boris Larin, senior security researcher at Kaspersky’s GReAT, explained the situation: “Researchers Zhiniang Peng and Xuefeng Li posted the PrintNightmare exploit on their Twitter account on Tuesday, along with an announcement of their upcoming Black Hat presentation. Apparently, the researchers did this by mistake, assuming that the vulnerability used in their exploit was patched as CVE-2021-1675, and that the patch for it was released on 8 June.
“This turned out not to be the case [as] the patch for CVE-2021-1675 fixed another vulnerability, and the PrintNightmare exploit turned out to be a zero-day exploit with no security patch available,” said Larin.
CVE-2021-1675 was first disclosed in Microsoft’s June Patch Tuesday drop, but was initially thought to be a relatively low-impact privilege escalation vulnerability that could be used to run code as an admin on a target system running Windows Print Spooler.
However, on 21 June, Microsoft reclassified it as an RCE vulnerability and upped it from low to critical severity. This has complicated an already somewhat fraught situation, and further means the lack of a patch is of more concern than it might otherwise be.
Fortunately, John Hammond of Huntress, a US-based security platform supplier, said there was another option for defenders: “A temporary, band-aid solution is to disable the Print Spooler service.”
Hammond added that as long as disabling Print Spooler is appropriate – it can have unwanted side effects in some situations – it is fortunately quite an easy job and can be done on a single machine with a few PowerShell commands. Further details are available here.
Print Spooler is a native, built-in Windows service which is default-enabled on Windows machines to manage printers and print servers, and is therefore prevalent throughout enterprise IT estates.
Vulnerabilities have frequently been found in it through the years and can be highly effective – indeed, a Print Spooler vulnerability opened the door to the infamous Stuxnet incident.
Jan Vojtěšek, a malware researcher at Avast, said: “This vulnerability could allow a remote attacker to completely take over a Windows machine. It could also be used by an attacker to gain more privileges on a machine to which they already have some limited access.
“What makes this vulnerability extremely dangerous is the combination of the facts that it is unpatched as of now and that there exists a public PoC exploit. Any attacker can now attempt to exploit this vulnerability to enable them to perform some malicious actions. This puts a lot of pressure on Microsoft, which should now release the patch as soon as possible to prevent attackers from exploiting this vulnerability,” said Vojtěšek.
Kaspersky’s Larin added: “The vulnerability is undoubtedly serious because it allows you to elevate privileges on the local computer or gain access to other computers within the organisation’s network. At the same time, this vulnerability is generally less dangerous than, say, the recent zero-day vulnerabilities in Microsoft Exchange, mainly because to exploit PrintNightmare, attackers must already be on the corporate network.”
This, mercifully for defenders, means that it is probably unlikely that PrintNightmare will become a vector for widespread cyber attacks. Nevertheless, in addition to disabling Print Spooler until a patch is confirmed to be available, security teams would be well-advised to reinforce their general defences, pay attention to employee awareness, check there is sound hygiene around credentials, and ensure that data held by the organisation is well-protected.