CVE-2023-27350: An Authentication Bypass Vulnerability in PaperCut MF/NG

July 3, 2023
Muhammad Kamran Hasan
CVE-2023-27350
Unauthenticated remote code executionUnauthenticated remote code executionAuthentication bypassArbitrary code execution
SYSTEM user privilege escalation
Vulnerable targets
Security risk
System compromise
Exploitation of CVE-2023-27350
CVE-2023-27350: An Authentication Bypass Vulnerability in PaperCut MF/NG

Affected Versions

The vulnerability affects PaperCut MF/NG versions 8.0 and above, but prior to versions 20.1.7, 21.2.11, or 22.0.9.

Impact

An attacker with access to the vulnerable web interface could exploit this vulnerability to gain SYSTEM privileges on the target system. This could allow them to take control of the system and execute arbitrary commands.

Mitigation

The vulnerability has been fixed in PaperCut MF/NG versions 20.1.7, 21.2.11, and 22.0.9. Users should update to the latest version of PaperCut MF/NG to mitigate this vulnerability.

Remediation

If you are unable to update to the latest version of PaperCut MF/NG, you can mitigate the vulnerability by disabling the SetupCompleted class. To do this, you can edit the papercut.properties file and add the following line:

setupcompleted.class=disabled

Once you have added this line, you can save the papercut.properties file and restart the PaperCut MF/NG service.

Shodan Dorks:

  • http.html:"papercut"

  • http.html:"papercut" port:9191

  • http.title:"PaperCut Login"

Technical Details

The vulnerability in CVE-2023-27350 exists in the SetupCompleted class. This class is responsible for processing the results of the setup wizard. When the setup wizard is completed, the SetupCompleted class is called. The SetupCompleted class checks to see if the user has entered a valid license key. If the user has entered a valid license key, the SetupCompleted class proceeds to install PaperCut MF/NG. If the user has not entered a valid license key, the SetupCompleted class displays an error message.

The issue with the SetupCompleted class is that it does not properly validate the "service" parameter in URL requests. This allows attackers to pass arbitrary values to the "service" parameter, which can then be used to access protected pages or execute arbitrary code.

For example, an attacker could pass the following value to the "service" parameter:

/app?service=page/SetupCompleted?command=ls

This would cause the SetupCompleted class to execute the ls command on the PaperCut server. This would allow the attacker to list the contents of the current directory on the server.

Similarly, an attacker could also pass the following value to the "service" parameter:

/app?service=page/Dashboard

This would cause the SetupCompleted class to redirect the attacker to the Dashboard page, which is accessible to users who have logged in to the PaperCut application. If the attacker is not logged in, they would be able to bypass authentication and access the Dashboard page.

Summary

CVE-2023-27350 is an authentication bypass vulnerability in PaperCut MF/NG print management software. The vulnerability exists in the SetupCompleted class, which is responsible for processing the results of the setup wizard. The vulnerability can be exploited by an attacker to bypass authentication and execute arbitrary code as SYSTEM on vulnerable targets. Users should update to the latest version of PaperCut MF/NG to mitigate this vulnerability. If you are unable to update to the latest version of PaperCut MF/NG, you can mitigate the vulnerability by disabling the SetupCompleted class.

CVE-2024-8517: SPIP Remote Code Execution Vulnerability
CVE-2024-8517: SPIP Remote Code Execution Vulnerability
2024-10-13
Kamran Hasan
CVE-2024-23334: A Deep Dive into aiohttp's Directory Traversal Vulnerability
CVE-2024-23334: A Deep Dive into aiohttp's Directory Traversal Vulnerability
2024-09-10
Kamran Hasan
CVE-2024-37568: Authlib Algorithm Confusion Vulnerability
CVE-2024-37568: Authlib Algorithm Confusion Vulnerability
2024-08-16
James McGill
CVE-2024-40348: Bazarr Directory Traversal Vulnerability
CVE-2024-40348: Bazarr Directory Traversal Vulnerability
2024-07-30
James McGill
Python-JOSE Security Risk: CVE-2024-33663 Explained
Python-JOSE Security Risk: CVE-2024-33663 Explained
2024-07-21
James McGill
CVE-2024-27316: A Deep Dive into the nghttp2 Header Overflow
CVE-2024-27316: A Deep Dive into the nghttp2 Header Overflow
2024-07-21
James McGill