<?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>Kaggle-Mcp — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/kaggle-mcp/</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, 09 Jan 2024 10:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/kaggle-mcp/feed.xml" rel="self" type="application/rss+xml"/><item><title>Kaggle-MCP Path Traversal Vulnerability in prepare_kaggle_dataset Function</title><link>https://feed.craftedsignal.io/briefs/2024-01-kaggle-mcp-path-traversal/</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-kaggle-mcp-path-traversal/</guid><description>A path traversal vulnerability exists in the prepare_kaggle_dataset function of kaggle-mcp up to version 406127ffcb2b91b8c10e20e6c2ca787fbc1dc92d, allowing remote attackers to access arbitrary files by manipulating the competition_id argument.</description><content:encoded><![CDATA[<p>A path traversal vulnerability has been identified in the kaggle-mcp project, specifically affecting versions up to 406127ffcb2b91b8c10e20e6c2ca787fbc1dc92d. The vulnerability resides within the <code>prepare_kaggle_dataset</code> function located in the <code>src/kaggle_mcp/server.py</code> file.  Successful exploitation allows a remote attacker to read sensitive files from the server. The vulnerability stems from insufficient sanitization of the <code>competition_id</code> argument. The exploit is publicly known, increasing the risk of widespread exploitation. The project uses a rolling release model, making it difficult to pinpoint specific affected versions. The maintainers have been notified but have not yet addressed the issue.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker identifies a vulnerable kaggle-mcp instance.</li>
<li>The attacker crafts a malicious HTTP request targeting the endpoint that utilizes the <code>prepare_kaggle_dataset</code> function.</li>
<li>The attacker injects a path traversal sequence (e.g., <code>../</code>) into the <code>competition_id</code> parameter of the HTTP request.</li>
<li>The application fails to properly sanitize the <code>competition_id</code> parameter.</li>
<li>The <code>prepare_kaggle_dataset</code> function uses the unsanitized <code>competition_id</code> to construct a file path.</li>
<li>The application accesses a file outside of the intended directory due to the path traversal.</li>
<li>The attacker receives the contents of the accessed file in the HTTP response.</li>
<li>The attacker repeats this process to enumerate and exfiltrate sensitive files, potentially gaining access to credentials, configuration files, or source code.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows an attacker to read arbitrary files on the server hosting the kaggle-mcp application. This can lead to the disclosure of sensitive information, such as configuration files containing database credentials, API keys, or source code. This information can be further leveraged to compromise other systems or data. The number of potential victims is unknown, but depends on the adoption rate of the vulnerable kaggle-mcp application.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Inspect web server logs for HTTP requests containing path traversal sequences (e.g., <code>../</code>, <code>..%2f</code>) in the <code>cs-uri-query</code> field targeting endpoints associated with the <code>prepare_kaggle_dataset</code> function using the provided Sigma rule.</li>
<li>Implement input validation and sanitization on the <code>competition_id</code> parameter to prevent path traversal attacks.</li>
<li>Monitor web server logs for unusual file access patterns originating from the kaggle-mcp application based on the provided Sigma rule.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>path-traversal</category><category>web-application</category><category>cve</category></item></channel></rss>