<?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>Mcp — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/mcp/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Mon, 11 May 2026 13:59:36 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/mcp/feed.xml" rel="self" type="application/rss+xml"/><item><title>PraisonAI MCP Path Traversal to RCE via .pth Injection</title><link>https://feed.craftedsignal.io/briefs/2026-05-praisonai-mcp-pth-rce/</link><pubDate>Mon, 11 May 2026 13:59:36 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-praisonai-mcp-pth-rce/</guid><description>PraisonAI's MCP server is vulnerable to path traversal leading to arbitrary code execution by writing a Python `.pth` file into the user's site-packages directory, triggered via poisoned LLM contexts or unauthenticated HTTP-stream transports due to unvalidated kwargs in the dispatcher and lack of containment checks in file-handling tools.</description><content:encoded><![CDATA[<p>PraisonAI&rsquo;s MCP (Model Context Protocol) server registers four file-handling tools by default: <code>praisonai.rules.create</code>, <code>praisonai.rules.show</code>, <code>praisonai.rules.delete</code>, and <code>praisonai.workflow.show</code>. Each accepts a path or filename string from MCP <code>tools/call</code> arguments and joins it onto <code>~/.praison/rules/</code> (or accepts an absolute path for <code>workflow.show</code>) without proper validation. The JSON-RPC dispatcher passes <code>params[&quot;arguments&quot;]</code> without validating against the advertised input schema. This allows an attacker to write arbitrary files by escaping the rules directory, leading to arbitrary code execution via Python <code>.pth</code> injection into the user site-packages directory. The vulnerability can be exploited via LLMs with poisoned context, unauthenticated HTTP-stream transports, or prompt injection. No operator misconfiguration is required to trigger the vulnerability.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker poisons the context of an LLM connected to a PraisonAI MCP server through attacker-controlled web content, documents, or emails.</li>
<li>The user interacts with the LLM, asking it to summarize or analyze the poisoned content, which contains a crafted command.</li>
<li>The LLM, under prompt injection, crafts a <code>tools/call</code> request to the MCP server, targeting <code>praisonai.rules.create</code> with a malicious <code>rule_name</code>.</li>
<li>The crafted <code>rule_name</code> includes path traversal sequences (e.g., <code>../../</code>) to write a file outside the intended rules directory.</li>
<li>The MCP server&rsquo;s <code>rules.create</code> handler, lacking containment checks, writes the file to a location such as the user&rsquo;s site-packages directory (e.g., <code>~/.local/lib/python3.14/site-packages/evil.pth</code>).</li>
<li>The written file is a Python <code>.pth</code> file containing an <code>import os; os.system(&quot;malicious_command&quot;)</code> statement.</li>
<li>The next time the user starts a Python interpreter (including the <code>praisonai</code> CLI), the <code>.pth</code> file is processed, executing the attacker&rsquo;s arbitrary code.</li>
<li>The attacker achieves arbitrary code execution with the user&rsquo;s privileges, potentially leading to data exfiltration, system compromise, or lateral movement.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows an attacker to achieve arbitrary code execution on the victim&rsquo;s machine. This can lead to data exfiltration, installation of malware, or further compromise of the system. The vulnerability affects any user running a PraisonAI MCP server connected to an LLM without proper input validation, and the default configuration of the HTTP-stream transport exposes the server to local attacks without requiring authentication. The impact is significant as it can compromise the user&rsquo;s entire system and any data accessible to the user account.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Apply input validation and containment to all file-handling tools. Specifically, implement checks to prevent path traversal in <code>praisonai.rules.create</code>, <code>praisonai.rules.show</code>, and <code>praisonai.rules.delete</code> as detailed in the &ldquo;Suggested fix&rdquo; section of the advisory.</li>
<li>Enforce schema validation in the MCP dispatcher to ensure that <code>params[&quot;arguments&quot;]</code> conforms to the expected schema, rejecting unknown properties and type mismatches.</li>
<li>Restrict the <code>workflow.show</code> tool to only accept paths within a designated workflow directory and reject absolute paths or any value containing <code>..</code>, as outlined in the &ldquo;Suggested fix&rdquo; section.</li>
<li>Deploy the Sigma rules provided in this brief to detect potential exploitation attempts and tune them for your environment.</li>
<li>Require authentication on non-loopback HTTP-stream binds to prevent unauthorized access to the MCP server when using <code>praisonai mcp serve --transport http-stream</code>.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>path-traversal</category><category>code-execution</category><category>prompt-injection</category><category>mcp</category></item></channel></rss>