Summary
JimuReport versions 2.3.4 and below contain an expression injection flaw where user input is passed directly into the Aviator expression engine.
Under these conditions, an attacker can supply crafted expressions to execute arbitrary code on the server through the exposed API endpoint.
Affected context
This vulnerability arises in JimuReport deployments exposing the /jmreport/executeSelectApi endpoint where client-provided parameters are evaluated as Aviator expressions.
It is most relevant when external users or integrated systems can influence query or filter parameters that are ultimately passed into the expression engine without robust validation, sanitization, or whitelisting.
Environments where the application server has broad system or network privileges face elevated risk because code executed by the expression engine runs with the server's effective permissions.
Exploit preconditions
- Attack surface: HTTP-accessible
/jmreport/executeSelectApiendpoint - Required access: Ability to send authenticated or unauthenticated requests to the endpoint, depending on deployment access controls
- Trigger point: Submission of attacker-controlled data that is interpreted as an Aviator expression by the server
- Why exploitation is possible: The application forwards user input directly into the Aviator expression engine without constraining allowed operations, enabling injection of expressions that can invoke arbitrary methods or system functions
Why this happens
The root cause maps to CWE-94: Improper Control of Generation of Code ('Code Injection').
JimuReport treats untrusted user input as executable logic by passing it to the Aviator expression engine with insufficient restrictions.
Instead of confining input to a narrow set of simple, data-oriented expressions, the engine is allowed to interpret complex, attacker-supplied code fragments that can access server-side resources.
This pattern violates the principle of separating data from code and of enforcing strict whitelists on any dynamic evaluation mechanism.
Potential impact
- Execution of arbitrary code with the permissions of the application server
- Access to or modification of sensitive report data and underlying databases
- Lateral movement within the internal network from the compromised server
- Installation of backdoors or use of the server as a pivot for further attacks
- Disruption of reporting services, including data tampering or denial of service
General mitigation guidance
Effective mitigation focuses on avoiding direct evaluation of untrusted input and restricting the capabilities of any expression engine.
Common defensive patterns include:
- Eliminating dynamic code or expression evaluation for user-controllable fields where feasible
- Restricting the expression engine to a predefined, whitelisted subset of safe functions and operators
- Treating all client input as data only, using parameterization instead of constructing evaluable expressions from raw input
- Introducing strict validation rules that limit length, structure, and allowed characters in expression-related fields
- Running the reporting service with minimal OS and network privileges to limit the blast radius of potential code execution
How teams detect issues like this
Detection generally combines code-centric and behavior-centric approaches:
- Static analysis rules that flag dynamic expression or code evaluation APIs receiving tainted (user-controlled) input
- Manual code review focused on endpoints that pass request parameters to scripting, templating, or expression engines
- Security testing that submits malformed or clearly code-like payloads to expression-backed endpoints and monitors for evaluation errors or unexpected behavior
- Runtime monitoring and logging of expression evaluation failures, anomalous function invocations, or suspicious outbound network activity originating from the reporting service
Automated SAST and API security testing tools can help highlight high-risk use of expression engines during development and CI.

