<?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>Evolver — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/evolver/</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>Sat, 10 Aug 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/evolver/feed.xml" rel="self" type="application/rss+xml"/><item><title>Evolver Path Traversal Vulnerability in `fetch` Command</title><link>https://feed.craftedsignal.io/briefs/2024-08-evolver-path-traversal/</link><pubDate>Sat, 10 Aug 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-08-evolver-path-traversal/</guid><description>A path traversal vulnerability exists in the `fetch` command of `@evomap/evolver` due to insufficient validation of the `--out` flag, allowing attackers to write files to arbitrary locations on the filesystem, potentially leading to overwriting critical system files and privilege escalation.</description><content:encoded><![CDATA[<p>The <code>@evomap/evolver</code> package contains a path traversal vulnerability in its <code>fetch</code> command, specifically affecting versions prior to 1.69.3. This flaw arises from the insufficient validation of user-supplied paths provided via the <code>--out</code> flag. By manipulating this flag, attackers can bypass intended directory restrictions and write files to arbitrary locations on the filesystem. This can lead to critical system file modification, potentially leading to privilege escalation and persistent backdoor installation. The vulnerability exists in the <code>index.js</code> file, where the application processes the <code>--out</code> flag without proper sanitization before writing files to the specified directory. This is particularly concerning in automated environments like CI/CD pipelines where user input might be indirectly injected into the <code>fetch</code> command.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker gains control over the input to the <code>fetch</code> command, including the <code>--out</code> flag.</li>
<li>The attacker crafts a malicious <code>--out</code> parameter containing path traversal sequences (e.g., <code>../../../</code>).</li>
<li>The <code>fetch</code> command in <code>index.js</code> processes the <code>--out</code> flag and extracts the user-provided path without validation.</li>
<li>The application attempts to create the directory specified by the manipulated <code>--out</code> flag using <code>fs.mkdirSync</code> with the <code>recursive</code> option.</li>
<li>The application writes files (e.g., downloaded skill files) to the directory specified in the <code>--out</code> parameter using <code>fs.writeFileSync</code>, effectively writing to an arbitrary location.</li>
<li>If the attacker has sufficient privileges, they can overwrite critical system files or create new files in sensitive directories like <code>/etc/cron.d</code>.</li>
<li>The attacker leverages the modified files to achieve persistence (e.g., by creating a cron job).</li>
<li>The attacker executes malicious code, gaining unauthorized access or escalating privileges.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows an attacker to write files to arbitrary locations on the filesystem. This can lead to several critical consequences, including overwriting system configuration files, installing persistent backdoors via cron jobs, modifying SSH authorized_keys for unauthorized access, and potentially achieving privilege escalation if the affected process runs with elevated privileges. The impact is particularly severe in automated environments where this tool is used to deploy code, as it opens the door for supply chain attacks. This issue affects users of <code>@evomap/evolver</code> prior to version 1.69.3.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade the <code>@evomap/evolver</code> package to version 1.69.3 or later to remediate the path traversal vulnerability.</li>
<li>Deploy the Sigma rule <code>Detect Evolver Path Traversal Attempt</code> to identify exploitation attempts based on command-line arguments.</li>
<li>Monitor process creation events for command-line arguments containing path traversal sequences like <code>../</code> when executing <code>node</code> or <code>nodejs</code> related to evolver.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>path-traversal</category><category>arbitrary-file-write</category><category>privilege-escalation</category><category>evolver</category></item><item><title>Evolver Remote Code Execution via Command Injection in `_extractLLM()`</title><link>https://feed.craftedsignal.io/briefs/2024-01-09-evolver-rce/</link><pubDate>Tue, 09 Jan 2024 10:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-09-evolver-rce/</guid><description>A command injection vulnerability in the `_extractLLM()` function of the evolver application allows remote attackers to execute arbitrary shell commands by injecting shell metacharacters into the `corpus` parameter, leading to potential system compromise.</description><content:encoded><![CDATA[<p>A command injection vulnerability exists in the <code>_extractLLM()</code> function within the <code>src/gep/signals.js</code> file of the evolver application, specifically in versions prior to 1.69.3. The vulnerability stems from the function&rsquo;s construction of a <code>curl</code> command via string concatenation, incorporating the <code>corpus</code> parameter without sufficient sanitization. This parameter, derived from user input through the <code>extractSignals()</code> function, is susceptible to shell command substitution using the <code>$(...)</code> syntax when processed by <code>execSync()</code>. Successful exploitation grants attackers the ability to execute arbitrary shell commands within the context of the Node.js process. This flaw poses a significant risk, potentially leading to full system compromise, data exfiltration, or the installation of malicious software.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts a malicious input string containing shell metacharacters (e.g., <code>$(...)</code>).</li>
<li>This malicious string is passed as the <code>userSnippet</code> parameter to the <code>extractSignals()</code> function within <code>src/gep/evolver.js</code>.</li>
<li>The <code>extractSignals()</code> function processes the user snippet and extracts a summary.</li>
<li>The extracted summary, which includes the malicious payload, is passed as the <code>corpus</code> parameter to the vulnerable <code>_extractLLM()</code> function in <code>src/gep/signals.js</code>.</li>
<li>The <code>_extractLLM()</code> function constructs a <code>curl</code> command by concatenating strings, embedding the unsanitized <code>corpus</code> parameter within the command string.</li>
<li>The <code>curl</code> command is executed using <code>execSync()</code>, which interprets the shell metacharacters and executes the injected commands.</li>
<li>The injected commands are executed with the privileges of the Node.js process.</li>
<li>The attacker achieves remote code execution, enabling them to perform actions such as data exfiltration or system compromise.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows an attacker to execute arbitrary commands on the server hosting the evolver application. This can lead to full system compromise, allowing attackers to steal sensitive data, install malware, or pivot to other systems on the network. The vulnerability affects anyone running the evolver with the GEP (Genetic Evolution Protocol) enabled and processing user-provided content. The affected package is npm/@evomap/evolver (vulnerable: &lt; 1.69.3).</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade the <code>@evomap/evolver</code> package to version 1.69.3 or later to patch the vulnerability.</li>
<li>Deploy the Sigma rule &ldquo;Detect Evolver Command Injection Attempt&rdquo; to identify attempts to exploit this vulnerability by detecting shell metacharacters in process execution logs.</li>
<li>Review and sanitize all user-provided content before it is processed by the <code>extractSignals()</code> and <code>_extractLLM()</code> functions.</li>
<li>Implement strict input validation to prevent shell metacharacters from reaching the vulnerable code.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>command-injection</category><category>rce</category><category>evolver</category></item></channel></rss>