GHSA-52cq-7v8r-62c6: gmaps-mcp's unauthenticated HTTP transport allows unlimited Google Maps API calls at operator expense
Оценка Noroxi
Приоритет: Наблюдать (оценка срочности 0/100)
- В отслеживаемых источниках (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) нет публичного эксплойта или записей об эксплуатации.
- Может быть вызвана любым, у кого есть доступ через интернет. Учётная запись или пароль не требуются. Действия пользователя не требуются. Особые условия не требуются; воспроизводится стабильно.
- Исправленная версия: gmaps-mcp (PyPI) 0.1.3.
Пока низкий приоритет. Обновитесь до gmaps-mcp (PyPI) 0.1.3 или новее.
Формируется автоматически по данным записи: CVSS (NVD и CNA), CISA KEV и SSVC, FIRST EPSS, источники эксплойтов, исправленные версии. Как мы считаем
Первоисточники: OSV
## Unauthenticated HTTP Transport Allows Unlimited Google Maps API Calls at Operator Expense The `gmaps-mcp` codebase was reviewed at commit `e671db68c804c9e67d51582d3280839ffa65f127` and three issues worth flagging were discovered — one high-severity, one medium, one structural. There were no preexisiting CVEs for this package yet and the repository had no prior security issues. The primary issue is that the HTTP transport in `server.py` skips authentication entirely when `MCP_API_KEY` is not set — which is the default, since `.env.example` ships the key as a blank value. Any unauthenticated caller who knows the server's public URL can invoke all six tools and generate live, billed Google Maps API requests against the operator's key. Because the README explicitly instructs operators to expose the server via ngrok (`ngrok http 8000`, then point MCP clients at the ngrok URL), this configuration gets deployed internet-facing as a matter of normal usage. **Affected files and exact lines:** `src/google_maps_mcp/server.py`, lines 186–192: ```python expected_key = os.getenv("MCP_API_KEY") if not expected_key: # If no MCP_API_KEY is set, allow all requests (development mode) return await call_next(request) if api_key != expected_key: return JSONResponse( {"error": "Invalid or missing API key. Provide X-API-Key header."}, status_code=401 ) ``` `run.py` lines 37 and 38 bind to `0.0.0.0:8000` by default (`MCP_HOST=0.0.0.0`, `MCP_PORT=8000`). No rate-limiting middleware exists anywhere in the codebase — not in the middleware stack, not in `GoogleMapsClient`, not in the tool handlers. **Attack model:** operator deploys with default config (blank `MCP_API_KEY`), exposes via ngrok per the README instructions, attacker discovers the ngrok URL through ngrok's public endpoint scan surface or via a targeted test of shared URLs. No credentials needed to call the server. **PoC — reproduces from the default config:** ```bash # Start with default .env.example (MCP_API_KEY blank/unset) export GOOGLE_MAPS_API_KEY=<operator_key> python run.py # binds 0.0.0.0:8000 # From attacker machine — no X-API-Key header needed: curl -X POST http://<server>:8000/mcp/ \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"geocode","arguments":{"address":"Times Square New York"}}}' # Returns geocoding results. Request billed to operator's GCP project. ``` The financial harm is real and accumulates fast. Google's $200/month free credit exhausts in roughly 3 hours at Places API pricing (~$17/1,000 requests) with a sustained 1 req/sec flood. More practically: any developer testing the ngrok URL, sharing it in a project thread, or posting it in a demo context creates a window where anyone with the link can silently drain quota. The attacker doesn't need the `GOOGLE_MAPS_API_KEY` value — they only need the MCP server URL. **Fix — three concrete changes, no new dependencies:** 1. In HTTP transport mode, refuse to start if `MCP_API_KEY` is unset. Add a startup check in `server.py` (or `run.py`) that exits with a clear message if the environment variable is blank when the transport is HTTP. Something like: ```python if transport == "http" and not os.getenv("MCP_API_KEY"): raise SystemExit( "ERROR: MCP_API_KEY must be set before starting the HTTP server. " "Unset key allows unauthenticated access to all Google Maps API calls." ) ``` 2. Update `.env.example` — change `MCP_API_KEY=` to a comment that makes the requirement explicit: `# Required for HTTP transport. Generate with: python -c "import secrets; print(secrets.token_hex(32))"` 3. Add a one-line warning to the README before the ngrok step: "Before running ngrok, set `MCP_API_KEY` in your `.env`. Without it, anyone with the URL can make unlimited Google Maps API calls billed to your account." A token-bucket rate limiter (e.g., `slowapi`, which is already compatible with Starlette/FastAPI-style apps) would add another layer, but the auth fix is the critical path. --- The second issue is in `src/google_maps_mcp/client.py` at line 130: ```python url = f"https://places.googleapis.com/v1/places/{place_id}" ``` `place_id` comes from the MCP tool caller with no format validation and is interpolated verbatim into the URL path. `httpx` does not encode `/` or `?` in f-string URLs — only when using a `params=` dict. A crafted `place_id` like `":searchText?textQuery=attacker-query"` produces `https://places.googleapis.com/v1/places/:searchText?textQuery=attacker-query`, which routes to the text search endpoint instead of the details endpoint, with attacker-controlled query content. Injection is bounded to `places.googleapis.com` since the host is hardcoded, but it lets an attacker hit different endpoint semantics within that namespace and potentially force higher-cost API calls. **Fix:** ```python import re PLACE_ID_PATTERN = re.compile(r'^[A-Za-z0-9_\-]+(/[A-Za-z0-9_\-]+)?$') async def get_place_details(self, place_id: str) -> dict: if not PLACE_ID_PATTERN.match(place_id): raise ValueError(f"Invalid place_id format: {place_id!r}") url = f"https://places.googleapis.com/v1/places/{place_id}" ... ``` Google Place IDs are alphanumeric strings with an optional `places/` segment prefix. That pattern eliminates all path and query injection. --- The third issue is structural and currently benign, but worth flagging given the package is installable via PyPI as `gmaps-mcp`. The repository ships `.claude/skills/google-maps-mcp/SKILL.md` at the repo root. Claude Code and any harness using the same skill auto-discovery path pattern will auto-load this file as a system-level instruction when an agent clones the repository or opens the directory after install. The current content is legitimate usage documentation, so there's no active harm — but the file is a persistent injection surface. A future commit to `SKILL.md` could plant arbitrary instructions (exfiltrate environment variables, call an attacker-controlled URL before each tool response, silently modify output) that would enter agent context without any visible indicator for every developer or agent that installs `gmaps-mcp`. The exposure is broader than it would be for a private repo: PyPI install means the audience includes every Claude Code, Cursor, and similar agent-enabled IDE user who pulls the package and opens it in an agent context. **Fix:** Move the skill documentation out of the auto-load path. Rename it to `docs/claude-skill-reference.md` (not auto-loaded), or remove it and note in the README that users who want Claude Code skill integration should add the file locally. Either approach preserves the UX without leaving a standing injection surface in the install tree.
- Опубликовано
- 8 мая 2026 г.
- Обновлено
- 8 мая 2026 г.
- EPSS
- —
- CWE
- CWE-20
Инструменты для отчёта
Оценка срочности
0
Пока низкий приоритет.
- CVSS
- 0 / 40 · —
- CISA KEV
- 0 / 30 · Нет в списке
- EPSS
- 0 / 30 · —
Узнайте, когда запись изменится
- Нет в KEV: эксплуатация в реальных атаках не зафиксирована
- Публичного эксплойта нет
- Исправление выпущено
Если что-то из этого изменится, сообщим в ежедневной сводке.
Затронута ли ваша версия? ПроверьтеАнализ Noroxi
Что это значит для вашей инфраструктуры?
Оценка выше формируется автоматически по данным записи и не знает вашей среды. Наша команда проверит на ваших системах, действительно ли уязвимость эксплуатируема и какой меры достаточно.
Мы используем этот продукт, нужна помощьЗатронутые системы
Затронута ли ваша версия?
Выберите продукт и введите свою версию. Она сравнивается с диапазонами этой записи прямо в браузере и никуда не отправляется.
| Вендор | Продукт | CPE |
|---|---|---|
| PyPI | gmaps-mcp | pkg:pypi/gmaps-mcp |
Затронутые пакеты
Данные OSV и GitHub Advisory: экосистема, пакет и диапазон. Сопоставление SBOM использует эту таблицу.
| Экосистема | Пакет | Затронутый диапазон | Исправление |
|---|---|---|---|
| PyPI | gmaps-mcp | до 0.1.3 | 0.1.3 |
Исправление
На какую версию обновиться
Версии с исправлением по данным вендора, реестров пакетов и Microsoft. Перед обновлением сверьтесь с бюллетенем вендора.
| Продукт / пакет | Исправленная версия | Источник |
|---|---|---|
| PyPI:gmaps-mcp | 0.1.3 | Реестр пакетов (OSV) |
Статус эксплойта
Публичный эксплойт неизвестен
Публичный эксплойт пока не обнаружен. Это не значит, что вы в безопасности, лишь что порог чуть выше.
Контекст для исследователя
Для пентестеров и исследователей: профиль атаки, расхождение оценок, хронология, коммиты исправлений, авторы, кандидаты в варианты и цепочки, охват bug bounty. Всё выводится из имеющихся данных; без кода эксплойтов.
Хронология
От публикации до сегодня: proof of concept, модуль Metasploit, CISA KEV и запись об исправлении. Даты — как сообщают источники.
Кроме публикации датированных событий нет.
Ссылки на патчи и коммиты
Коммиты, PR и diff среди источников. Отправная точка для patch-diff и поиска вариантов; это исправления, не эксплойты.
В записи нет: истории EPSS · указания авторов находки · кандидатов в варианты и цепочки · публичной программы вознаграждений.
Технические детали
Условия атаки
- Может быть вызвана любым, у кого есть доступ через интернет.
- Учётная запись или пароль не требуются.
- Действия пользователя не требуются.
- Особые условия не требуются; воспроизводится стабильно.
В случае успеха
- Конфиденциальность
- Целостность
- Доступность
- Вектор атаки
- Сеть
- Сложность атаки
- Низкая
- Требуемые привилегии
- Не требуются
- Взаимодействие с пользователем
- Не требуется
Класс уязвимости (CWE)
CWE-20 · Improper Input ValidationВектор CVSS
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:H/SC:N/SI:N/SA:N
osv
Контекст атаки
Шаблоны атак MITRE CAPEC и техники ATT&CK для этого класса уязвимости (CWE). Отправная точка для правил обнаружения и threat hunting.
Шаблоны атак (CAPEC)
- Buffer Overflow via Environment VariablesCAPEC-10вероятность: High · High
- Server Side Include (SSI) InjectionCAPEC-101вероятность: High · High
- Cross Zone ScriptingCAPEC-104вероятность: Medium · High
- Command Line Execution through SQL InjectionCAPEC-108вероятность: Low · Very High
- Object Relational Mapping InjectionCAPEC-109вероятность: Low · High
- SQL Injection through SOAP Parameter TamperingCAPEC-110вероятность: High · Very High
- Double EncodingCAPEC-120вероятность: Low · Medium
- Subverting Environment Variable ValuesCAPEC-13вероятность: High · Very High
Техники ATT&CK
- Obfuscated Files or InformationT1027
- Masquerading: Invalid Code SignatureT1036.001
- Steal Web Session CookieT1539
- Subvert Trust Controls: Code SigningT1553.002
- Impair Defenses:Impair Command History LoggingT1562.003
- Hijack Execution Flow:Dynamic Linker HijackingT1574.006
- Hijack Execution Flow:Path Interception by PATH Environment VariableT1574.007
Журнал изменений (2)
- Исправление✗ → ✓
- CVSS8 → —
Для отслеживаемых записей эти изменения приходят и как уведомления. →
Источники
Показать все источники (ещё 3)Свернуть
Рекомендации вендоров и официальные записи. Ссылки на эксплойты/PoC намеренно исключены.