Proactive Security Virtual Summit: Proving Security in the Era of AI

PaperCut CVE-2023-27350 Deep Dive and Indicators of Compromise

Overview On 8 March 2023, PaperCut released new versions for their enterprise print management software, which included patches for two vulnerabilities: CVE-2023-27350 and CVE-2023-27351. The PaperCut security advisory details CVE-2023-27350 as a vulnerability that may allow an attacker to achieve remote code execution to compromise the PaperCut application server. PaperCut also details in this advisory…

Zach Hanley

April 24, 2023

Attack Blogs

Overview

On 8 March 2023, PaperCut released new versions for their enterprise print management software, which included patches for two vulnerabilities: CVE-2023-27350 and CVE-2023-27351. The PaperCut security advisory details CVE-2023-27350 as a vulnerability that may allow an attacker to achieve remote code execution to compromise the PaperCut application server. PaperCut also details in this advisory that they became aware of it from Zero Day Initiative (ZDI). The ZDI case, ZDI-CAN-18987, details the vulnerability as an authentication bypass which leads to code execution.

On 19 April 2023, PaperCut became aware of in-the-wild exploitation of the product and published additional details including several indicators of compromise such as log file entries, known malicious domains, and YARA rules to detect observed malicious activity.

Subsequent research by Huntress also detailing this vulnerability was released on 21 April 2023 – including exploitation details and additional indicators of compromise.

In this post we’ll walk through the methodology of discovering the vulnerability given the security advisory, look at the root cause, analyze the patch, and develop an exploit proof-of-concept.

Locating the Vulnerability

Inspecting the ZDI case reveals valuable information within the Vulnerability Details:

The specific flaw exists within the SetupCompleted class. The issue results from improper access control. An attacker can leverage this vulnerability to bypass authentication and execute arbitrary code in the context of SYSTEM.

We find that the JAR that contains this SetupCompleted class is within C:\Program Files\PaperCut NG\server\lib\pcng-server-web-19.2.7.jar.

Decompiling a JAR can be done several ways, in this case we use CFR. CFR is a useful utility that can decompile Java via the command line to human-readable code that can be used as input for diff’ing tools.

java -jar cfr-0.152.jar v19.2.7/web-jar/pcng-server-web-19.2.7.jar --outputdir v19.2.7/web-jar/decompiled/

Looking at the decompiled class ./biz/papercut/pcng/web/setup/SetupCompleted.java, we see that upon submitting the form it calls performLogin() for the Admin user on line 48.

The performLogin() function can be found at ./biz/papercut/pcng/web/pages/Home.java. 

This function is normally called throughout the software only after a user has had their password validated through a login flow. However, here in the SetupCompleted flow, the logic accidentally validates the session of the anonymous user. This type of web application vulnerability is called Session Puzzling.

Comparing the vulnerable SetupCompleted class from v19.2.7 to the patched version in v21.2.11 with Meld, we see that if setup has already been completed, visiting this page will now redirect to the “Home” page – eliminating the session puzzling logic flaw.

Confirming the authentication bypass in the GUI, we browse to the page at  http://10.0.40.56:9191/app?service=page/SetupComplete and click “Login”.

Developing the Exploit

Huntress`s blog details a method to obtain remote code execution by abusing the built-in “Scripting” functionality for printers. Inspecting the Device Scripting page, we see that it enables the administrator to develop hooks to customize printing across the enterprise.

The scripts are written in JavaScript and execute in the context of the PrintCut service – which runs as NT AUTHORITY\SYSTEM on Windows deployments.

Developing a script to interact with the site normally would be pretty straight forward, but the PaperCut web application uses dynamic form fields based on the last request – so it makes it slightly less straightforward.

To develop the exploit proof-of-concept, you’ll have to use sessions and individually request each page as you would through the user interface to ensure the form fields are populated properly.

Our full proof-of-concept exploit can be found on our GitHub.

Indicators of Compromise

PaperCut has been compiling indicators as observed from exploitation in-the-wild in their advisory and will be the best source of all indicators to be on the look out for. This section lists indicators that are observed when exploiting this vulnerability using our proof-of-concept.

Navigating to the native application logs in the Logs -> Application Log tab, several indicators can be observed. While most of the indicators will appear in normal use, special attention should be given to unfamiliar source IP addresses, times, and all of these events happening in quick succession.

Authentication Bypass Indicator:

User "admin" logged into the administration interface.

Settings Change Indicator (Precursor to RCE):

User "admin" updated the config key "<A>" to "<B>".

Specifically print.script.sandboxed and print-and-device.script.enabled.

Remote Code Execution Indicator:

Admin user "admin" modified the print script on printer "<printer>".

Internet Exposure

Querying Shodan for http.html:"papercut" http.html:"print"  shows approximately 1700 internet exposed PaperCut servers.

The PaperCut application is popular with the State, Local, and Education (SLED) type organizations, where just education makes up 450 of those results.

Get a demo

Your attack surface and the threat landscape are constantly evolving. Scale your security across cloud, on prem, and hybrid infrastructure with NodeZero.

Get a demo

Get a demo

Your attack surface and the threat landscape are constantly evolving. Scale your security across cloud, on prem, and hybrid infrastructure with NodeZero.

Get a demo
NodeZero pentest dashboard showing running and completed tests, host counts, and trends in impacts, weaknesses, and credentials.

NodeZero® Platform

Implement a continuous find, fix, and verify loop with NodeZero

The NodeZero platform empowers your organization to reduce your security risks by autonomously finding exploitable weaknesses in your network, giving you detailed guidance around how to prioritize and fix them, and having you immediately verify that your fixes are effective.

Explore NodeZero

Related content

PHP2Shell advisory for CVE-2026-109618 and CVE-2026-109619

PHP2Shell Exposure Depends on More Than Whether You Use PHP

October 22, 2026

PHP2Shell exposure can extend into bundled runtimes, containers, and hosted applications. Learn why identifying affected PHP is only the first step toward validating exploitability.

AhsayCBS CVE-2026-105133 and CVE-2026-105134 vulnerability research graphic

AhsayCBS Deep-Dive: Auth Bypass to RCE

October 15, 2026

Horizon3 researchers reverse engineer CVE-2026-105133 and CVE-2026-105134 in AhsayCBS, demonstrating how an authentication bypass and path traversal can be chained to create administrator accounts, upload JSP…

Switchvox CVE-2026-9586 validation demonstrating remote code execution

Off the Hook: Discovering and Observing Active Exploitation of Sangoma Switchvox CVE-2026-9586

September 1, 2026

Horizon3 researchers discovered CVE-2026-9586, an unauthenticated SQL injection vulnerability in Sangoma Switchvox that leads to remote code execution and is now being actively exploited.