Back to skill

Security audit

Mapbox MCP Runtime Patterns

Security checks for vulnerabilities and agentic risk

Overview

This is mostly legitimate Mapbox integration guidance, but it needs review because some examples send location data to Mapbox despite offline wording and use unpinned package execution.

Review before installing or copying into production. Pin @mapbox/mcp-server and Python dependencies, run examples in an isolated environment with narrowly scoped tokens, and disclose that hosted MCP use sends coordinates and route/search queries to Mapbox, including for examples that call tools described as offline.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:136
Finding
Unpinned Remote Dependencies Can Change and Execute After Review<![CDATA[ ## Vulnerability Details **File Locations**: - `SKILL.md:136-142` - `AGENTS.md:58-61` - `AGENTS.md:73-74` - `AGENTS.md:92-93` - `examples/python/requirements.txt:4-16` - `examples/README.md:17` **Vulnerability Type**: Unpinned remote package installation and execution **Risk Level**: Medium ### Complete Code Snippets `SKILL.md:136-142`: ```bash npm install @mapbox/mcp-server ``` Or use directly via npx: ```bash npx @mapbox/mcp-server ``` `AGENTS.md:58-61`: ```bash npm install @mapbox/mcp-server # Or: npx @mapbox/mcp-server export MAPBOX_ACCESS_TOKEN="your_token" ``` `AGENTS.md:70-74`: ```python import subprocess # Start MCP server mcp = subprocess.Popen(['npx', '@mapbox/mcp-server'], env={'MAPBOX_ACCESS_TOKEN': token}) ``` `AGENTS.md:90-93`: ```typescript import { spawn } from 'child_process'; const mcp = spawn('npx', ['@mapbox/mcp-server'], { env: { MAPBOX_ACCESS_TOKEN: process.env.MAPBOX_ACCESS_TOKEN } }); ``` `examples/python/requirements.txt:4-16`: ```text # Core requests>=2.32.0 # Agent Frameworks pydantic-ai>=0.1.0 crewai>=0.83.0 smolagents>=1.0.0 # LLM Providers openai>=1.58.1 # Utilities python-dotenv>=1.0.1 ``` `examples/README.md:17`: ```bash pip install -r requirements.txt ``` ### Technical Analysis The documented `npx @mapbox/mcp-server` command may download and immediately execute the package version selected by the npm registry at invocation time. Because no exact version is specified, the effective executable can change after this Skill has been reviewed. The Python requirements similarly use open-ended lower bounds rather than exact versions or a hash-verified lockfile. A future installation can therefore resolve dependency versions that were not part of this audit. Python and npm package installation can execute package lifecycle or build logic under the installing user's account. The package names observed during the audit are expected public packages, and the TypeScript lockfile resol ...[truncated 1930 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the MCP server to an explicitly reviewed version: ```bash npm install --save-exact @mapbox/mcp-server@REVIEWED_VERSION npx --yes @mapbox/mcp-server@REVIEWED_VERSION ``` 2. Prefer installation from a committed npm lockfile followed by: ```bash npm ci --ignore-scripts ``` If lifecycle scripts are required, review them first and enable scripts only for the necessary installation step. 3. Replace open-ended Python requirements with exact, reviewed versions: ```text requests==REVIEWED_VERSION pydantic-ai==REVIEWED_VERSION crewai==REVIEWED_VERSION smolagents==REVIEWED_VERSION openai==REVIEWED_VERSION python-dotenv==REVIEWED_VERSION ``` 4. Generate and commit a Python lockfile containing hashes. Enforce hash verification during installation, such as with: ```bash pip install --require-hashes -r requirements.lock ``` 5. Use automated dependency scanning and controlled update tooling. Review changelogs, package ownership, provenance, integrity metadata, and lifecycle scripts before accepting upgrades. 6. Run installation and examples in an isolated virtual environment or container under a non-privileged account. Supply narrowly scoped, short-lived API tokens and avoid exposing unrelated credentials to dependency installation processes. 7. Document the exact package versions that were security-reviewed so users do not mistake unconstrained future releases for audited components. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (79)

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding
This second mismatch similarly shows that the skill description omits supported runtimes and the concrete use of authenticated hosted-server access. In security-sensitive agent platforms, incomplete disclosure can lead to over-trusting a skill that has broader runtime and data-handling implications than its summary suggests.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
This second mismatch similarly shows that the skill description omits supported runtimes and the concrete use of authenticated hosted-server access. In security-sensitive agent platforms, incomplete disclosure can lead to over-trusting a skill that has broader runtime and data-handling implications than its summary suggests.

Credential Access

High
Category
Privilege Escalation
Content
https://mcp.mapbox.com/mcp
```

No installation required. Simply pass your Mapbox access token in the `Authorization` header.

**Benefits:**
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
## Prerequisites

1. **Mapbox Access Token**: Get one at [mapbox.com/account/access-tokens](https://console.mapbox.com/account/access-tokens/)
2. **OpenAI API Key** (or other LLM provider)
3. **HuggingFace Token** (for smolagents)
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Known Vulnerable Dependency: @hono/node-server==1.19.9 — 3 advisory(ies): CVE-2026-39406 (@hono/node-server: Middleware bypass via repeated slashes in serveStatic); GHSA-frvp-7c67-39w9 (Node.js Adapter for Hono: Path traversal in `serve-static` on Windows via encode); CVE-2026-29087 (@hono/node-server has authorization bypass for protected static paths via encode)

High
Category
Supply Chain
Confidence
93% confidence
Finding
@hono/node-server 1.19.9 is reported with middleware bypass and path traversal issues around static file serving and encoded paths. If example code exposes static assets or protected paths, attackers may bypass authorization or read unintended files, making this a meaningful web-facing risk.

Known Vulnerable Dependency: express-rate-limit==8.2.1 — 1 advisory(ies): CVE-2026-30827 (express-rate-limit: IPv4-mapped IPv6 addresses bypass per-client rate limiting o)

High
Category
Supply Chain
Confidence
94% confidence
Finding
express-rate-limit 8.2.1 is flagged for bypass via IPv4-mapped IPv6 addresses, which can let one client evade per-client throttling. In an AI/MCP runtime context, rate-limit bypass is significant because it can amplify abuse, scraping, and denial-of-service against expensive model or geospatial endpoints.

Known Vulnerable Dependency: fast-uri==3.1.0 — 7 advisory(ies): CVE-2026-13676 (fast-uri vulnerable to host confusion via failed IDN canonicalization); CVE-2026-18446 (fast-uri vulnerable to host confusion via backslash authority introducer); CVE-2026-75975 (fast-uri vulnerable to server-side request forgery via malformed IPv6 normalizat) +4 more

High
Category
Supply Chain
Confidence
89% confidence
Finding
fast-uri 3.1.0 is reported with multiple URI parsing flaws including host confusion and possible SSRF-relevant normalization issues. In stacks that validate or route based on parsed URLs, malformed attacker-supplied URIs could bypass hostname restrictions or security checks.

Known Vulnerable Dependency: form-data==4.0.5 — 1 advisory(ies): CVE-2026-12143 (form-data: CRLF injection in form-data via unescaped multipart field names and f)

High
Category
Supply Chain
Confidence
90% confidence
Finding
form-data 4.0.5 is flagged for CRLF injection through multipart field names or filenames. If user-controlled metadata is inserted into multipart requests, this can corrupt downstream requests or enable header/body injection against integrated services.

Known Vulnerable Dependency: hono==4.11.7 — 16 advisory(ies): CVE-2026-56762 (Hono missing validation of cookie name on write path in setCookie()); CVE-2026-47676 (Hono: app.mount() strips mount prefix using undecoded path, causing incorrect ro); CVE-2026-47675 (Hono: Cookie helper does not sanitize sameSite and priority, allowing Set-Cookie) +13 more

High
Category
Supply Chain
Confidence
93% confidence
Finding
hono 4.11.7 is reported with numerous advisories including cookie-setting and routing/mount path issues. Given this project's focus on runtime integration and likely HTTP-exposed services, framework-level auth, routing, or header handling flaws materially increase attack surface.

Known Vulnerable Dependency: ip-address==10.0.1 — 2 advisory(ies): GHSA-mwp4-54f8-5fhr; GHSA-v2v4-37r5-5v8g

High
Category
Supply Chain
Confidence
88% confidence
Finding
ip-address 10.0.1 is flagged by high-severity advisories, typically relevant where IP parsing or classification informs access control, SSRF prevention, or rate limiting. In this dependency graph it is especially relevant because express-rate-limit and network-aware middleware may rely on correct IP interpretation.

Known Vulnerable Dependency: js-yaml==3.14.2 — 4 advisory(ies): GHSA-2883-xcg3-v3hh; GHSA-52cp-r559-cp3m; GHSA-5p4m-2wfm-xmqj +1 more

High
Category
Supply Chain
Confidence
90% confidence
Finding
js-yaml 3.14.2 has multiple known advisories and is an old parser version historically associated with unsafe parsing and denial-of-service classes of issues. If any untrusted YAML is processed by tooling or runtime code, this can lead to parser abuse or unsafe object construction depending on usage mode.

Known Vulnerable Dependency: js-yaml==4.1.1 — 4 advisory(ies): GHSA-2883-xcg3-v3hh; GHSA-52cp-r559-cp3m; GHSA-5p4m-2wfm-xmqj +1 more

High
Category
Supply Chain
Confidence
88% confidence
Finding
js-yaml 4.1.1 is also flagged by the scanner, so there are multiple installed YAML parser versions with known issues. This broadens exposure because either direct or transitive YAML-processing code may hit vulnerable parsing behavior.

Known Vulnerable Dependency: langsmith==0.3.87 — 4 advisory(ies): GHSA-3644-q5cj-c5c7; GHSA-fw9q-39r9-c252; GHSA-rr7j-v2q5-chgv +1 more

High
Category
Supply Chain
Confidence
84% confidence
Finding
langsmith 0.3.87 is reported with several high-severity advisories. Because LangSmith commonly handles prompts, traces, metadata, and external service communication in AI systems, flaws here could affect confidentiality, integrity, or service availability depending on the advisory specifics.

Known Vulnerable Dependency: nanoid==3.3.11 — 3 advisory(ies): GHSA-28wg-ghj8-5hjv; GHSA-2v37-7h3g-55p8; GHSA-xwg4-73v4-xw9w

High
Category
Supply Chain
Confidence
87% confidence
Finding
nanoid 3.3.11 is flagged by multiple advisories, making this a real supply-chain risk in the locked dependency set. If used for security-sensitive token, identifier, or nonce generation, weaknesses could reduce unpredictability or enable collisions depending on the underlying issue.

Possible Typosquatting: 'radash' resembles popular package 'lodash'

High
Category
Supply Chain
Confidence
70% confidence
Finding
Package name closely resembles a popular package, suggesting possible typosquatting. Attackers publish malicious packages with similar names to trick developers into installing them.

Whitespace Padding

Medium
Category
Prompt Injection
Content
## Tools Available

| Category              | Tools                                                                                                                                                                                            | Cost            |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------- |
| **Offline (Turf.js)** | `distance_tool`, `bearing_tool`, `midpoint_tool`, `point_in_polygon_tool`, `area_tool`, `buffer_tool`, `centroid_tool`, `bbox_tool`, `simplify_tool`                                             | Free, instant   |
| **Mapbox APIs**       | `directions_tool`, `search_and_geocode_tool`, `reverse_geocode_tool`, `category_search_tool`, `isochrone_tool`, `matrix_tool`, `static_map_image_tool`, `map_matching_tool`, `optimization_tool` | API costs apply |
Confidence
70% confidence
Finding
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Whitespace Padding

Medium
Category
Prompt Injection
Content
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------- |
| **Offline (Turf.js)** | `distance_tool`, `bearing_tool`, `midpoint_tool`, `point_in_polygon_tool`, `area_tool`, `buffer_tool`, `centroid_tool`, `bbox_tool`, `simplify_tool`                                             | Free, instant   |
| **Mapbox APIs**       | `directions_tool`, `search_and_geocode_tool`, `reverse_geocode_tool`, `category_search_tool`, `isochrone_tool`, `matrix_tool`, `static_map_image_tool`, `map_matching_tool`, `optimization_tool` | API costs apply |
| **Utility**           | `version_tool`, `category_list_tool`                                                                                                                                                             | Free            |

## Coordinate Formats
Confidence
70% confidence
Finding
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The hosted-server guidance and examples encourage sending precise coordinates and route queries to Mapbox services but do not warn about privacy implications, consent requirements, or data-handling obligations. In a geospatial agent context, location data can be highly sensitive and may expose home, work, travel, or behavioral patterns if transmitted without appropriate notice and controls.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding
The examples instruct users to execute `npx @mapbox/mcp-server` without pinning an exact package version. This creates a supply-chain risk: future compromised, malicious, or breaking releases could be pulled at runtime and executed automatically in production or developer environments.

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill references capabilities that involve environment secrets, MCP connectivity, and network access, but it does not declare any explicit tool scope or permissions boundary. In an agent ecosystem, this can cause the skill to be loaded with broader authority than users expect, increasing the chance of unintended token exposure or outbound calls.

Rp1

Medium
Category
MCP Rug Pull
Confidence
86% confidence
Finding
Using `npx @mapbox/mcp-server` without pinning a version makes builds non-reproducible and can pull in newly published code at execution time. If the upstream package is compromised or introduces breaking behavior, downstream agents may execute unreviewed code or change security properties unexpectedly.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The code sends user-supplied geospatial queries and coordinates to an external Mapbox endpoint without any user-facing notice, consent flow, or disclosure. In a geospatial agent context, location data may be sensitive, so silent third-party transmission creates privacy and compliance risk.

Intent-Code Divergence

Medium
Confidence
98% confidence
Finding
The tool description says the distance calculation works offline with no API cost, but the implementation actually sends coordinates to the remote Mapbox MCP service. In an agent setting, misleading capability descriptions can cause operators and users to unknowingly transmit sensitive location data and make incorrect trust, privacy, and cost decisions.

External Transmission

Medium
Category
Data Exfiltration
Content
}
        }

        response = requests.post(
            self.url,
            headers=self.headers,
            json=request
Confidence
80% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
}
        }

        response = requests.post(
            self.url,
            headers=self.headers,
            json=request
Confidence
80% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

Detected: suspicious.env_credential_access, suspicious.prompt_injection_instructions

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
examples/typescript/langchain-example.ts:26

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
examples/typescript/mastra-example.ts:24

Prompt-injection style instruction pattern detected.

Warn
Code
suspicious.prompt_injection_instructions
Location
references/production.md:167