/

CVE-2024-43028

Severity:

CRITICAL RISK

(9.8)

Command Injection in JEECG Boot show Endpoint

CVE-2024-43028

Analyzed

Vulnerability type

Category:

Command Injection

CWE:

CWE-77

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

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/show endpoint.
  • 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/show that 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/show code 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/show for 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.

Sources

SourceLink
gist.github.comgist.github.com/aqyoung/e3b7ba5d8b8261df7d09931dbe779b3b
pan.baidu.compan.baidu.com/s/1h2RGEvxuvsKtsn2-TlFlmA?pwd=gf5r

Frequently asked

questions

Yes. If the /jmreport/show endpoint is exposed to the Internet or any untrusted network, a remote attacker can exploit the issue by sending crafted HTTP requests, without needing local access to the server.

It depends on how the application is configured. If /jmreport/show is accessible without authentication, then no credentials are required. If it is behind authentication or access control, an attacker would first need valid access or need to bypass those controls.

The most robust fix is to remove direct shell command execution from the report-handling path and rely on built-in APIs or libraries instead. If external tools must be used, construct commands using safe subprocess APIs with fixed executables and strictly validated, allow-listed arguments, never concatenating raw user input into shell command strings.

Adopt a secure-by-default design that treats all external input as untrusted, avoids shell invocation for routine tasks, and enforces input validation and allow-listing on any data influencing system-level operations. Complement these practices with code review, static analysis rules targeting command execution APIs, and security testing integrated into the development lifecycle.

Find out what's already
exploitable in your codebase.