CVE-2026-38165 is a Server-Side Template Injection vulnerability in XDocReport's Velocity integration, affecting versions up to 2.1.0 when untrusted DOCX templates are processed. The vulnerable processing path uses Apache Velocity's velocityEngine.evaluate() to evaluate template content during report.process(). If an application accepts attacker-controlled DOCX templates and renders them without adequate isolation or template restrictions, injected Velocity expressions can access Java classes and invoke sensitive functionality, resulting in server-side command execution. The issue is particularly relevant to document management, HR, reporting and content generation applications that allow template uploads.
From an exploitation perspective, the impact is equivalent to arbitrary code execution within the privileges of the Java process, with potential access to application secrets, files, credentials and other internal resources. The primary security boundary is therefo