<?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>@Evomap — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/vendors/@evomap/</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/vendors/@evomap/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></channel></rss>