Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-109199 Overview
CVE-2026-109199 is a code injection vulnerability [CWE-94] in LogicalDOC Community Edition through version 9.3. Authenticated users can inject Apache Velocity templates into the subject or message fields of the DocumentService.sendAsEmail endpoint. The server-side scripting engine evaluates these templates, allowing attackers to invoke SystemTool.exec or ClassTool methods and run operating system commands. The exploit bypasses the forbidRuntimeUsage denylist that was intended to block java.lang.Runtime instantiation. Commands execute with the privileges of the LogicalDOC process.
Critical Impact
An authenticated attacker with permission to send documents by email can achieve arbitrary OS command execution on the LogicalDOC server, leading to full compromise of the document management host.
Affected Products
- LogicalDOC Community Edition (all versions through 9.3)
- logicaldoc-core component containing SystemTool and ClassTool automation classes
- logicaldoc-webapp component exposing DocumentServiceImpl.sendAsEmail
Discovery Timeline
- 2026-10-12 - CVE-2026-109199 published to NVD
- 2026-10-13 - Last updated in NVD database
Technical Details for CVE-2026-109199
Vulnerability Analysis
LogicalDOC processes email subject and message fields through the Velocity scripting engine before sending. This design treats user-controlled input as trusted template content. The automation sandbox exposes helper objects, including SystemTool, which wraps java.lang.Runtime.exec, and ClassTool, which can instantiate arbitrary classes by name.
The original denylist in ClassTool.newInstance checked only for the literal string java.lang.Runtime. Attackers can bypass this check by instantiating other classes that reach Runtime indirectly, or by calling SystemTool.exec directly from within the Velocity template. Because evaluation occurs server-side with full process privileges, command output and file system access align with the LogicalDOC service account.
Root Cause
The root cause is unsafe evaluation of user-supplied content by the Velocity engine combined with an insufficient class denylist. The sendAsEmail method in DocumentServiceImpl passes the GUI-provided subject and body directly to the scripting engine. The forbidRuntimeUsage control performed a single string equality check rather than enforcing an allowlist of safe classes.
Attack Vector
Exploitation requires network access and valid credentials with permission to call DocumentService.sendAsEmail. The attacker submits a crafted Velocity template in the email subject or body referencing $SystemTool.exec(...) or $ClassTool.newInstance(...). No user interaction is required beyond the authenticated API call.
// Vendor patch excerpt - ClassTool.java
public Object newInstance(String className)
throws InstantiationException, IllegalAccessException, ClassNotFoundException, IllegalArgumentException,
InvocationTargetException, NoSuchMethodException, SecurityException {
- if (className.equals("java.lang.Runtime"))
- throw new SecurityException("Class java.lang.Runtime is forbidden and cannot be instantiated");
+ checkForbiddenClass(className);
try {
return Class.forName(className).getDeclaredConstructor().newInstance();
Source: LogicalDOC Commit 66c3a6b. The patch replaces the single string comparison with a checkForbiddenClass helper that applies a broader class denylist, closing the Runtime bypass.
Stop Remote Code Execution Before It Runs
Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.
Stop Exploit AttemptsDetection Methods for CVE-2026-109199
Indicators of Compromise
- Outbound email records from LogicalDOC where the stored subject or body contains Velocity directives such as $SystemTool, $ClassTool, #set, or ${.
- Child processes spawned by the LogicalDOC Java process (java, tomcat, or the service account) executing shells, curl, wget, powershell.exe, or cmd.exe.
- Application log entries from DocumentServiceImpl.sendAsEmail immediately followed by unexpected process creation or outbound network connections.
Detection Strategies
- Audit the LogicalDOC database and audit tables for historical sendAsEmail invocations and inspect the stored subject and message content for template syntax.
- Deploy process-lineage detections that flag any OS command executed as a child of the LogicalDOC JVM.
- Alert on authenticated API calls to DocumentService.sendAsEmail from service accounts or IP ranges that do not normally send email.
Monitoring Recommendations
- Forward LogicalDOC application and access logs to a centralized log platform and retain for correlation with endpoint telemetry.
- Monitor egress traffic from the LogicalDOC host for connections to uncommon destinations following sendAsEmail activity.
- Track creation of new local accounts, scheduled tasks, or cron jobs on the LogicalDOC server, which may indicate post-exploitation persistence.
How to Mitigate CVE-2026-109199
Immediate Actions Required
- Upgrade LogicalDOC Community Edition to the version containing commit 66c3a6b9b47f9f6c624047eea43b219851378f00 or later.
- Restrict network access to the LogicalDOC web interface to trusted administrative networks until patched.
- Review and revoke unnecessary user accounts with permission to send documents by email.
- Rotate credentials and secrets accessible to the LogicalDOC process account if exploitation is suspected.
Patch Information
The vendor fix is published in the LogicalDOC community repository. It introduces checkForbiddenClass in ClassTool.java and filters attachments to downloadable documents only in DocumentServiceImpl.java. See the LogicalDOC Commit Details and the VulnCheck Advisory on LogicalDOC for full remediation details.
Workarounds
- Disable or restrict the sendAsEmail functionality at the reverse-proxy layer until the patched version is deployed.
- Enforce least-privilege operation by running the LogicalDOC service under a dedicated low-privilege account with no shell access.
- Apply web application firewall rules that reject requests to the DocumentService.sendAsEmail endpoint containing Velocity directives such as $SystemTool, $ClassTool, or #set.
# Example reverse-proxy rule (nginx) to block Velocity directives in sendAsEmail requests
location ~ /services/.*sendAsEmail {
if ($request_body ~* "(\$SystemTool|\$ClassTool|#set\s*\(|java\.lang\.)") {
return 403;
}
proxy_pass http://logicaldoc_backend;
}
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

