<?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>Googlemaps — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/googlemaps/</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>Tue, 30 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/googlemaps/feed.xml" rel="self" type="application/rss+xml"/><item><title>gmaps-mcp Unauthenticated HTTP Transport Allows Unlimited Google Maps API Calls</title><link>https://feed.craftedsignal.io/briefs/2024-01-30-gmaps-mcp-unauth-api/</link><pubDate>Tue, 30 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-30-gmaps-mcp-unauth-api/</guid><description>The gmaps-mcp package allows unauthenticated access to Google Maps API calls when deployed with a blank MCP_API_KEY, potentially leading to significant financial costs for the operator; it also permits path injection attacks.</description><content:encoded><![CDATA[<p>The <code>gmaps-mcp</code> package (version 0.1.2 and earlier) is vulnerable to a critical flaw that allows unauthenticated attackers to make unlimited Google Maps API calls at the operator&rsquo;s expense. This occurs because the HTTP transport in <code>server.py</code> does not enforce authentication when the <code>MCP_API_KEY</code> environment variable is not set, which is the default configuration. As a result, any attacker who knows the server&rsquo;s URL can invoke the API and generate billed requests. The default configuration, as detailed in the README, instructs operators to expose the server via ngrok, making it accessible over the internet. Additionally, the <code>place_id</code> parameter in <code>client.py</code> is vulnerable to path injection, enabling attackers to manipulate the Places API endpoint.  A Claude skill file is shipped with the package, creating a potential injection surface.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Operator deploys <code>gmaps-mcp</code> with the default configuration, including a blank <code>MCP_API_KEY</code> and exposes the server using ngrok per README instructions.</li>
<li>Attacker discovers the ngrok URL through public endpoint scans or targeted probes.</li>
<li>Attacker sends a POST request to the <code>/mcp/</code> endpoint without an <code>X-API-Key</code> header, invoking a Google Maps API tool.</li>
<li>The <code>server.py</code> code at lines 186-192 bypasses authentication checks because <code>MCP_API_KEY</code> is unset.</li>
<li>The request is forwarded to the Google Maps API, utilizing the operator&rsquo;s <code>GOOGLE_MAPS_API_KEY</code>.</li>
<li>The Google Maps API processes the request and returns the result to the attacker.</li>
<li>The operator&rsquo;s Google Cloud Platform (GCP) account is charged for the API usage.</li>
<li>Attacker repeats the process to exhaust the operator&rsquo;s free credit or generate significant charges.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability can result in significant financial losses for the operator due to unauthorized Google Maps API usage. An attacker can quickly exhaust the $200/month free credit, potentially leading to substantial charges. The Places API pricing is roughly $17 per 1,000 requests, and a sustained 1 request/second flood can exhaust the credit in approximately 3 hours. Furthermore, the path injection vulnerability in the <code>place_id</code> parameter allows attackers to manipulate the Places API endpoint, potentially forcing higher-cost API calls.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Implement the suggested fix by adding a startup check in <code>server.py</code> or <code>run.py</code> that exits if <code>MCP_API_KEY</code> is unset when using HTTP transport, preventing unauthenticated access (see <code>server.py</code> lines 186-192).</li>
<li>Update the <code>.env.example</code> file to clearly indicate that setting <code>MCP_API_KEY</code> is required for HTTP transport (see <code>.env.example</code>).</li>
<li>Add a warning to the README file before the ngrok instructions, emphasizing the importance of setting <code>MCP_API_KEY</code> to prevent unauthorized API calls (see README).</li>
<li>Deploy the Sigma rule <code>Detect gmaps-mcp Place ID Injection Attempt</code> to identify potential path injection attacks via the <code>place_id</code> parameter.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>googlemaps</category><category>unauthenticated-access</category><category>api-abuse</category><category>injection</category></item></channel></rss>