Summary
Evolution CMS 3.1.6 contains a code injection flaw that lets authenticated users with module creation permissions inject arbitrary PHP into module parameters.
When these crafted modules are created via POST requests and later executed, the embedded PHP code can run arbitrary system commands on the server.
Affected context
The vulnerability occurs within the Evolution CMS administrative interface, specifically in the module management functionality.
It affects deployments where:
- Users with module creation or editing rights can submit untrusted data to module parameters.
- PHP code embedded in module definitions is evaluated or executed server-side.
- There are no robust input validation or output encoding measures for module configuration fields.
The risk is most pronounced in environments where administrative or power-user accounts are shared, weakly protected, or granted more permissions than necessary.
Exploit preconditions
- Attack surface: HTTP interface of the Evolution CMS manager, particularly
/manager/index.php. - Required access: Authenticated CMS account with permissions to create or modify modules.
- Trigger point: Submission of a crafted POST request containing malicious PHP in the
postparameter to define or update a module, followed by execution of that module through the CMS. - Why exploitation is possible: Module parameters are treated as trusted PHP content and evaluated without adequate sanitization, allowing user-controlled data to become executable server-side code.
Why this happens
The underlying issue is a classic code injection pattern where user-supplied input is incorporated directly into dynamic code that the server later evaluates.
In Evolution CMS, module parameters appear to be stored and executed as PHP without separating configuration data from executable logic.
This maps to CWE-94: Improper Control of Generation of Code ('Code Injection'), where the application constructs or interprets executable code from values that an attacker can influence, without enforcing strict validation, encoding, or use of non-executable representations for user-provided content.
Potential impact
- Execution of arbitrary system commands with the web server or PHP process privileges.
- Reading or modification of sensitive CMS data, configuration files, or database contents.
- Installation of web shells or backdoors for persistent access.
- Use of the compromised CMS as a pivot point for further attacks within the hosting environment.
- Defacement or complete takeover of the website managed by Evolution CMS.
General mitigation guidance
Effective mitigation focuses on separating configuration data from executable code and reducing the trust placed in administrative input:
- Avoid treating module parameters or configuration fields as raw PHP or executable code; store them as data and interpret them using safe, non-eval mechanisms.
- Introduce strong server-side validation for module definitions, allowing only whitelisted constructs and disallowing arbitrary PHP or shell-related functions in user-controlled fields.
- Apply the principle of least privilege for administrative roles, granting module creation or editing rights only to strictly necessary accounts and isolating high-risk capabilities.
- Use execution sandboxes or templating engines that do not allow direct PHP execution when extensibility is required.
- Limit the system-level privileges of the web server and PHP runtime so that, even if code is injected, its ability to affect the underlying system is constrained.
How teams detect issues like this
Detection generally revolves around identifying unsafe code handling paths and monitoring for suspicious module behavior:
- Use static analysis to flag dynamic evaluation patterns (e.g.,
eval,includewith user-influenced paths, or direct execution of stored content from configuration tables) in module management code. - During code review, scrutinize any features that embed PHP or script code into database-stored configuration, templates, or modules, and verify that these values cannot be arbitrarily controlled by users.
- Implement application-level logging and monitoring for unusual module creations or updates, such as modules containing PHP function names commonly used in exploitation (e.g., process execution, file system access).
- Integrate security-focused CI checks or automated scanning tools to highlight code injection sinks and high-risk dynamic code constructs before deployment.

