<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Codeigniter — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/codeigniter/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Tue, 02 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/codeigniter/feed.xml" rel="self" type="application/rss+xml"/><item><title>CI4MS Theme Upload Zip Slip Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2024-01-02-ci4ms-zip-slip/</link><pubDate>Tue, 02 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-02-ci4ms-zip-slip/</guid><description>A critical vulnerability exists in ci4ms Theme::upload, where improper validation of ZIP archive entry names allows authenticated users with theme creation permissions to write files to arbitrary locations, leading to remote code execution.</description><content:encoded><![CDATA[<p>The ci4ms application is vulnerable to a Zip Slip attack in its theme upload functionality. This vulnerability, present in versions prior to 0.31.5.0, allows an authenticated backend user with theme creation privileges to upload a specially crafted ZIP archive. Due to the lack of proper validation of entry names during extraction, the attacker can write files to arbitrary locations on the filesystem. This is achieved by including malicious path traversal sequences (e.g., <code>../../</code>) in the ZIP archive&rsquo;s entry names. The vulnerability allows an attacker to place a PHP webshell in the public web root, enabling remote code execution on the server. This issue poses a significant risk to organizations using ci4ms, as it allows attackers to fully compromise the installation and access sensitive data.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker authenticates to the ci4ms backend with an account possessing the theme <code>create</code> role.</li>
<li>The attacker crafts a malicious ZIP archive containing a PHP webshell (e.g., <code>shell.php</code>) and an <code>info.xml</code> file for theme validation. The webshell is placed with a path traversal sequence, such as <code>../../public/shell.php</code>.</li>
<li>The attacker navigates to the theme upload functionality within the ci4ms backend, accessible via the <code>backend/themes/themesUpload</code> route.</li>
<li>The attacker uploads the malicious ZIP archive through the web interface, triggering the <code>Theme::upload</code> function.</li>
<li>The <code>ZipArchive::extractTo()</code> function extracts the contents of the ZIP archive to a temporary directory (<code>WRITEPATH . 'tmp/' . str_replace('_theme.zip', '', $file-&gt;getName()) . '/'</code>) without validating entry names.</li>
<li>Due to the path traversal sequences in the ZIP archive, the PHP webshell is written to the web server&rsquo;s document root (e.g., <code>/var/www/html/public/shell.php</code>).</li>
<li>The attacker accesses the PHP webshell via a web browser or command-line tool like <code>curl</code>, passing commands to be executed on the server (e.g., <code>https://target.example.com/shell.php?c=id</code>).</li>
<li>The webserver executes the attacker-supplied command, granting the attacker remote code execution on the compromised system.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this Zip Slip vulnerability allows an attacker to gain remote code execution on the ci4ms server. This grants the attacker full control over the server, potentially leading to the exfiltration of sensitive data, including database credentials stored in the <code>.env</code> file. The attacker can also modify or delete website content, install malware, or use the compromised server as a launching point for further attacks. This vulnerability affects versions of ci4ms prior to 0.31.5.0, and impacts any installation where an attacker can obtain theme creation privileges.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade ci4ms to version 0.31.5.0 or later to patch CVE-2026-41203.</li>
<li>Deploy the Sigma rule <code>Detect CI4MS Webshell Upload via Theme Exploit</code> to detect attempts to upload malicious themes containing webshells.</li>
<li>Implement input validation and sanitization measures to prevent path traversal attacks in file upload functionalities.</li>
<li>Restrict theme creation privileges to only trusted administrators and monitor theme creation activity for suspicious behavior.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>zip-slip</category><category>rce</category><category>codeigniter</category><category>vulnerability</category></item></channel></rss>