Summary
Jeecg Boot versions 3.0.0 to 3.5.3 contain a code injection vulnerability caused by lax character filtering in HTTP request processing.
By sending specially crafted HTTP requests, an attacker can inject and execute arbitrary code within application components, potentially taking full control of the affected server.
Affected context
The vulnerability appears in Jeecg Boot applications that expose HTTP endpoints relying on insufficient input filtering or sanitization before evaluating or using request data in dynamic execution contexts.
It typically manifests where incoming parameters are concatenated into scripts, expressions, or dynamically interpreted code paths without robust validation.
Deployments exposed to untrusted networks or users, such as internet-facing APIs or multi-tenant environments, are at particular risk if these endpoints are accessible without strong access controls.
Exploit preconditions
- Attack surface: Public or internal HTTP endpoints of a Jeecg Boot application
- Required access: Ability to send crafted HTTP requests to vulnerable endpoints (often unauthenticated or with low-privilege access)
- Trigger point: Request parameters or headers that are passed into dynamic evaluation mechanisms (e.g., expression engines, script evaluators, template logic) with lax character filtering
- Why exploitation is possible: User-controlled data is not adequately constrained or escaped, allowing injection of executable constructs that the application then interprets as code
Why this happens
This issue stems from treating user-supplied HTTP parameters as partially trusted code fragments instead of opaque data.
Jeecg Boot components appear to apply only superficial or character-based filtering, which fails to remove or neutralize all syntactic elements needed to form valid expressions or executable code.
As a result, attackers can craft payloads that survive these filters and are later processed by interpreters, expression languages, or reflection-based mechanisms, mapping directly to CWE-94: Improper Control of Generation of Code ('Code Injection').
The core pattern is dynamic code generation or evaluation influenced by input that is not strictly validated against a whitelist of safe, data-only formats.
Potential impact
- Remote execution of arbitrary code within the Jeecg Boot application context
- Full compromise of the underlying server or container, depending on process privileges
- Access to or modification of sensitive business data handled by the application
- Installation of backdoors or pivoting to other systems in the environment
- Defacement or logic manipulation of application workflows and reports
- Abuse of the compromised application as a launching point for further attacks
General mitigation guidance
Effective mitigation focuses on eliminating data-driven code paths and strictly separating code from data:
- Replace dynamic evaluation patterns (e.g., building expressions or scripts from request parameters) with static, parameterized operations wherever feasible.
- Enforce strong whitelisting of allowed input formats and values, especially for parameters that influence query building, expressions, or component behavior.
- Avoid using generic expression evaluators or scripting interfaces on untrusted input; if unavoidable, configure them with restricted execution contexts and limited capabilities.
- Apply robust input validation and canonicalization on server side, rejecting input containing control characters, metacharacters, or unexpected syntax relevant to the evaluation engine.
- Run the application under least-privilege accounts and restrict OS-level capabilities to limit the blast radius of any potential code execution.
- Isolate sensitive components and management interfaces behind strict authentication and network segmentation, reducing exposure of high-impact endpoints.
How teams detect issues like this
Organizations can approach detection using a combination of static and dynamic techniques:
- Static analysis: Search for use of dynamic evaluation APIs (e.g., script engines, expression parsers, reflection-based invocation) where any part of the evaluated string is derived from HTTP request data.
- Code review: Flag patterns where controllers or services concatenate request parameters into scripts, expressions, or configuration fragments instead of treating them as plain data.
- Security testing: Use fuzzing or security-focused HTTP testing (DAST) to probe endpoints with payloads containing code-like constructs and monitor for unexpected behavior or error messages indicating evaluation.
- Logging and monitoring: Monitor application logs for anomalous expression parsing errors, stack traces from script engines, or unusual command execution events.
- Policy enforcement: Introduce development guidelines that forbid unsafe dynamic execution on user-controlled input and enforce them through pre-commit hooks or CI checks, potentially with automated code scanning tools.

