Summary
A command injection vulnerability in the /jmreport/show component of JEECG Boot versions 3.0.0 through 3.5.3 allows attackers to run arbitrary system commands on the server.
By sending a specially crafted HTTP request to this endpoint, a remote attacker may achieve full remote code execution under the privileges of the application process.
Affected context
The vulnerability occurs in JEECG Boot applications that expose the /jmreport/show HTTP endpoint and pass user-controlled input into underlying system command execution or command-line utilities.
It is typically present when report rendering or export functionality invokes OS-level commands or shell utilities without robust input validation, proper argument handling, or shell escaping.
Any Internet-facing or untrusted-network deployment of JEECG Boot within the affected version range is at elevated risk, especially when the application process runs with broad system privileges.
Exploit preconditions
- Attack surface: Remote over HTTP(S), targeting the
/jmreport/showendpoint. - Required access: Ability to send crafted HTTP requests to the vulnerable endpoint (usually no prior authentication if the route is publicly accessible).
- Trigger point: Parameters handled by
/jmreport/showthat flow into shell commands, command-line tools, or system utilities. - Why exploitation is possible: User-supplied data is incorporated into command strings in an unsafe manner (e.g., concatenated into shell commands) without strict validation, quoting, or separation between data and executable logic, enabling injection of additional commands.
Why this happens
This issue stems from treating externally supplied data as part of an operating system command line, characteristic of CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection').
Instead of passing user input as structured, typed arguments into a subprocess API, the code likely builds a shell command string directly from HTTP request parameters and executes it.
Shell metacharacters (such as pipes, redirection operators, logical operators, or command separators) are not properly filtered or neutralized, allowing an attacker to escape the intended command context and execute arbitrary additional commands.
Potential impact
- Remote execution of arbitrary OS commands on the JEECG Boot server
- Reading, modifying, or deleting application and system data accessible to the application account
- Pivoting into the surrounding network, including lateral movement to other services
- Planting web shells, backdoors, or further malware for persistent access
- Full compromise of the host if the application runs with high or administrative privileges
General mitigation guidance
Effective mitigation focuses on removing the ability of user input to influence raw command lines and on minimizing the privileges of the executing context.
Recommended defensive patterns include:
- Avoid constructing shell command strings from request parameters; instead, use high-level language APIs or libraries that perform the needed functionality directly.
- When invoking external programs is unavoidable, use parameterized subprocess calls that treat user data strictly as arguments (e.g., argument arrays) without shell interpretation.
- Apply strict allow-lists for any input that may affect commands (e.g., enumerated report types, fixed file names, or IDs rather than free-form text).
- Normalize and validate all inputs early, rejecting unexpected characters such as shell metacharacters, path traversal tokens, or control characters.
- Run the JEECG Boot application and any helper processes under least-privilege accounts with restricted file system and network permissions.
- Isolate report-generation components through process, container, or sandbox boundaries where possible to limit blast radius.
How teams detect issues like this
Detection typically involves combining code-centric review with runtime monitoring:
- Static analysis: Search for uses of command execution APIs (e.g.,
Runtime.exec,ProcessBuilder, or language-specific wrappers) in the/jmreport/showcode path where user input flows into command strings; flag any string concatenation or interpolation that mixes user data with executable commands. - Code review: Examine controller and service methods servicing
/jmreport/showfor patterns such as dynamic shell commands, unvalidated file paths, or unchecked report parameters. - Security testing: Use dynamic application security testing (DAST) and fuzzing focused on the endpoint parameters to detect anomalous behavior or successful command injections.
- Runtime monitoring: Monitor logs and process activity for unexpected spawned processes, unusual command arguments originating from the application, or anomalies in report generation workflows.
- Policy enforcement: Incorporate secure coding guidelines into CI/CD, with automated checks that prohibit unsafe command construction patterns before code is merged.

