Back to skill

Security audit

Exa MCP

Security checks for vulnerabilities and agentic risk

Overview

This skill is a small, coherent Exa research setup guide, with a credential-handling caution because it documents an API key in a URL query string.

Install only if you are comfortable configuring an Exa API key for hosted MCP access. Use a dedicated, limited Exa key if possible, keep MCP configs and logs private, and rotate the key if an expanded endpoint URL may have been copied into logs, diagnostics, or shared files.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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)

T09 · Insecure Skill Coding Practices

Warning
Location
references/exa-mcp-setup.md:15
Finding
API Key Exposed Through MCP Endpoint Query String<![CDATA[ ## Vulnerability Details **File Location**: `references/exa-mcp-setup.md`, lines 15 and 27 **Vulnerability Type**: API key exposure through a URL query parameter **Risk Level**: Medium ### Vulnerable Code Line 15: ```text `https://mcp.exa.ai/mcp?exaApiKey=${MAVERICK_EXA_API_KEY}&tools=web_search_exa,web_search_advanced_exa,people_search_exa` ``` Lines 21–29, including the second occurrence at line 27: ```json { "mcpServers": { "exa": { "transport": { "type": "streamable-http", "url": "https://mcp.exa.ai/mcp?exaApiKey=${MAVERICK_EXA_API_KEY}&tools=web_search_exa,web_search_advanced_exa,people_search_exa" } } } } ``` ### Technical Analysis The documented MCP configuration places `MAVERICK_EXA_API_KEY` in the endpoint URL as the `exaApiKey` query parameter. Although the file does not contain a hardcoded secret, an MCP client that expands the environment-variable placeholder will construct a URL containing the plaintext API key. URLs are frequently captured by client diagnostics, proxy and gateway logs, telemetry systems, exception reports, configuration snapshots, browser or request history, and support bundles. HTTPS protects the URL while it is transmitted over the network, but it does not prevent endpoint software or authorized intermediaries from recording the complete URL. Exploitation requires an attacker to gain access to a location where the expanded URL has been recorded. The issue does not itself grant local system privileges or expose unrelated credentials. ### Attack Path 1. A user copies the documented MCP configuration and defines `MAVERICK_EXA_API_KEY`. 2. The MCP client or its configuration layer expands the placeholder into the endpoint URL. 3. The resulting URL includes the plaintext Exa API key in its query string. 4. The client, a debugging facility, telemetry collector, HTTP proxy, gateway, or support bundle records the complete URL. 5. An attacker with access to that record extrac ...[truncated 786 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Prefer an authorization header or a vendor-supported protected header configuration instead of placing the key in the URL. For example, configure the MCP transport to send the credential through an `Authorization` or service-specific API-key header when supported. 2. Store the key in the MCP client's secret-management facility or an environment variable that is referenced only by the protected header configuration. 3. If Exa requires query-string authentication for this endpoint: - Explicitly warn users that the expanded URL contains a secret. - Disable or redact URL logging in MCP clients, proxies, gateways, telemetry, and error reporting. - Ensure support bundles and diagnostic exports remove the `exaApiKey` parameter. - Restrict access to configuration files and logs containing expanded URLs. 4. Use a dedicated key with the minimum available permissions and appropriate usage limits. 5. Establish key-rotation and revocation procedures. Immediately rotate any key that may have appeared in logs or diagnostic output. 6. Add automated secret-redaction tests that verify values assigned to `exaApiKey` never appear in logs, exceptions, telemetry, or exported configuration. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The documentation places an API key in the URL query string for the MCP endpoint. Even though it uses an environment variable placeholder rather than a literal secret, query-string credentials are commonly exposed through logs, browser history, proxy telemetry, error reports, and shared configuration files, so the pattern creates a real credential-handling risk. In this skill context, the setup guidance is likely to be copied directly into client/server configs, which makes accidental leakage more likely.

Static analysis

No suspicious patterns detected.