The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-41587

CVE-2026-41587: CI4MS Theme Upload RCE Vulnerability

CVE-2026-41587 is a remote code execution vulnerability in CI4MS CMS that lets authenticated users upload malicious ZIP files to execute PHP code. This article covers the technical details, affected versions, and mitigations.

Published: May 7, 2026

CVE-2026-41587 Overview

CVE-2026-41587 is an unrestricted file upload vulnerability [CWE-434] in CI4MS, a CodeIgniter 4-based CMS skeleton with RBAC authorization and theme support. The flaw resides in the theme upload feature exposed to authenticated backend users holding the theme-upload permission. CI4MS extracts uploaded ZIP archives directly into the web-accessible public/ directory without filtering file extensions or content. Attackers can include PHP files inside a crafted ZIP and execute them over HTTP, achieving remote code execution on the underlying server. The issue affects versions from 0.26.0.0 up to but not including 0.31.7.0 and is patched in 0.31.7.0.

Critical Impact

Any authenticated backend user with the theme-upload permission can achieve remote code execution on the CI4MS host by uploading a ZIP archive containing PHP files.

Affected Products

  • CI4MS versions >= 0.26.0.0
  • CI4MS versions < 0.31.7.0
  • CodeIgniter 4-based deployments using the CI4MS Theme module

Discovery Timeline

  • 2026-05-07 - CVE-2026-41587 published to NVD
  • 2026-05-07 - Last updated in NVD database

Technical Details for CVE-2026-41587

Vulnerability Analysis

CI4MS exposes a backend theme installer that accepts ZIP archives and extracts them into the application's public/ directory. Before the patch, the extraction loop in modules/Theme/Controllers/Theme.php performed only a minimal path traversal check using a regular expression that matched literal .. substrings. It did not validate file extensions or scan archive contents for executable code.

Because public/ is served directly by the web server, any PHP file written there becomes reachable over HTTP. An authenticated attacker holding the theme-upload permission can package arbitrary .php payloads inside a theme ZIP and request the resulting URL to execute code in the application context. Successful exploitation yields full read, write, and code execution capability on the application's confidentiality, integrity, and availability.

Root Cause

The root cause is the absence of an allow-list for file extensions written into a web-accessible directory. The pre-patch loop iterates each ZIP entry and writes it without inspecting its extension, MIME type, or magic bytes. PHP source files are treated identically to static assets such as CSS or images.

Attack Vector

Exploitation requires network access to the backend and an authenticated session with the theme-upload privilege. The attacker crafts a ZIP archive named like a legitimate theme package, embeds a PHP webshell, and submits it through the theme upload form. After extraction, the attacker requests the deployed file under the public/ URL path and executes arbitrary code.

php
        $tempPath = WRITEPATH . 'tmp/' . str_replace('_theme.zip', '', $file->getName()) . '/';
        $zip = new \ZipArchive();
        if ($zip->open($file->getTempName()) === true) {
+            // ── Security: Pre-extraction validation ──────────────────────
+            // Allowed static file extensions for the public/ directory.
+            // PHP files MUST NOT be written under public/ (RCE prevention).
+            $allowedPublicExtensions = [
+                'css', 'js', 'map',
+                'png', 'jpg', 'jpeg', 'gif', 'svg', 'webp', 'ico', 'bmp', 'avif',
+                'woff', 'woff2', 'ttf', 'eot', 'otf',
+                'xml', 'json', 'txt', 'md',
+                'mp4', 'webm', 'ogg', 'mp3', 'wav',
+                'pdf',
+            ];
+
+            $forbiddenEntries = [];
+
            for ($i = 0; $i < $zip->numFiles; $i++) {
                $entryName = $zip->getNameIndex($i);
-                if (preg_match('/\.\./', $entryName)) {
+
+                // 1. Path traversal check (strengthened)
+                if (preg_match('/\.\.[\\/\\\\]/', $entryName) || preg_match('/^[\\/\\\\]/', $entryName)) {
                    $zip->close();
-                    return redirect()->route('backendThemes')->withInput()->with('errors', [lang('Theme.zipOpenFailed')]);
+                    return redirect()->route('backendThemes')->withInput()
+                        ->with('errors', [lang('Theme.pathTraversalDetected', [$entryName])]);
+                }
+
+                // 2. Forbidden file extension check for public/ directory

Source: GitHub Commit b969465

The patch introduces an allow-list of static asset extensions, strengthens the path traversal regex to catch directory separators, and rejects archives that contain forbidden entries before any file is written.

Detection Methods for CVE-2026-41587

Indicators of Compromise

  • New .php, .phtml, or .phar files appearing under the application's public/ directory tree, especially within theme subfolders.
  • ZIP files staged in WRITEPATH/tmp/ containing PHP entries, indicating recent theme uploads.
  • HTTP POST requests to backend theme upload endpoints followed by GET requests to newly created public/themes/<name>/*.php paths.
  • Web server access log entries showing PHP execution under theme directories from external IP addresses.

Detection Strategies

  • Hash and inventory all files under public/ and alert on the creation of executable PHP content within theme directories.
  • Inspect web server logs for sequential theme upload requests and subsequent direct requests to .php files inside theme paths.
  • Audit CI4MS application logs for theme-upload permission usage by accounts that do not normally manage themes.
  • Run static scanners against extracted theme directories to flag PHP eval, system, exec, or base64_decode patterns common to webshells.

Monitoring Recommendations

  • Enable file integrity monitoring on public/ and WRITEPATH/tmp/ to capture writes and extractions in real time.
  • Forward web and application logs to a centralized analytics platform and alert on theme upload events outside change windows.
  • Track authentication events for backend accounts with the theme-upload permission and review for credential abuse.

How to Mitigate CVE-2026-41587

Immediate Actions Required

  • Upgrade CI4MS to version 0.31.7.0 or later, which enforces an extension allow-list during ZIP extraction.
  • Audit the public/ directory for unexpected PHP files and remove any that were not part of an approved theme.
  • Revoke the theme-upload permission from accounts that do not require it and rotate credentials for any account that recently uploaded themes.
  • Review web server and application logs for suspicious theme uploads or PHP execution since 0.26.0.0 was deployed.

Patch Information

The vendor fix is in commit b969465e71eacd9eb57014ad1fce1fc34fa7bca0 and is shipped in CI4MS 0.31.7.0. See the GitHub Security Advisory GHSA-fw49-9xq4-gmx6 and the upstream commit for the patch contents, including the allow-list of static extensions and the strengthened path traversal regex.

Workarounds

  • Restrict the theme-upload permission to a minimal set of trusted administrators until upgrading is possible.
  • Configure the web server to deny PHP execution within theme directories under public/, for example by disabling .php handling for theme subpaths.
  • Place the backend interface behind an IP allow-list or VPN to reduce exposure of the upload endpoint.
bash
# Apache: disable PHP execution under public/themes/
<Directory "/var/www/ci4ms/public/themes">
    <FilesMatch "\.(php|phtml|phar)$">
        Require all denied
    </FilesMatch>
    php_flag engine off
</Directory>

# Nginx: return 403 for PHP files under theme directories
location ~ ^/themes/.*\.(php|phtml|phar)$ {
    return 403;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechCi4ms

  • SeverityHIGH

  • CVSS Score8.6

  • Known ExploitedNo
  • CVSS Vector
  • 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-434
  • Technical References
  • GitHub Commit Update

  • GitHub Security Advisory GHSA-fw49-9xq4-gmx6
  • Related CVEs
  • CVE-2026-41203: CI4MS Theme Upload RCE Vulnerability

  • CVE-2026-41202: CI4MS Backup Restore RCE Vulnerability

  • CVE-2026-25510: CI4MS CodeIgniter CMS RCE Vulnerability

  • CVE-2026-41891: CI4MS Auth Bypass Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English