T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:69
- Finding
- API Key Exposed Through URL Query Parameters## Vulnerability Details **File Location**: `SKILL.md:69`; corroborating setup examples at `README.md:27` and `README.md:34` **Vulnerability Type**: Credential exposure through insecure configuration **Risk Level**: Medium ### Vulnerable Code `SKILL.md:69`: ```text MCP server URL: `https://readx.cc/mcp?apikey=<API_KEY>` ``` `README.md:27`: ```bash claude mcp add --transport http readx -s user https://readx.cc/mcp?apikey=<API_KEY> ``` `README.md:30-36`: ```json { "mcpServers": { "readx": { "url": "https://readx.cc/mcp?apikey=<API_KEY>" } } } ``` ### Technical Analysis The Skill instructs users to embed a long-lived API key directly in an MCP URL query parameter. Although transmitting the key to `readx.cc` is required for the declared service, query-string authentication exposes the credential to more components than necessary. The URL may be retained in: - Shell command history - Editor or MCP configuration files - Process arguments and local diagnostic output - Client, proxy, CDN, or server access logs - Error reports and telemetry containing complete request URLs HTTPS protects the URL while it is in transit but does not prevent disclosure through these local or server-side records. The behavior therefore exceeds minimum necessary credential exposure even though it does not constitute deliberate exfiltration to an unrelated domain. ### Attack Path 1. A user substitutes their real API key into the documented MCP URL. 2. The user executes the setup command or saves the URL in an editor configuration. 3. The complete URL is recorded in shell history, configuration, process telemetry, request logs, or diagnostics. 4. An attacker or lower-privileged user obtains access to one of those records. 5. The attacker extracts the query parameter and authenticates to `readx.cc` as the victim. ### Impact Assessment Successful exploitation grants th ...[truncated 434 chars]
- Remediation
- ## Remediation Suggestions - Replace query-string authentication with an `Authorization: Bearer` header or another header-based authentication mechanism. - Configure the MCP client to obtain the key from a protected environment variable or secret store rather than interpolating it into a URL. - Ensure credential files use restrictive permissions, such as owner-only access on supported systems. - Avoid placing secrets directly in command-line arguments, examples, diagnostic output, or ordinary editor configuration. - Redact query strings and authorization data from client, proxy, CDN, and server logs. - Provide documented key revocation and rotation procedures for users who may have followed the current setup instructions. - If the MCP protocol requires a URL credential, use a short-lived, narrowly scoped token and exchange it for a session credential rather than exposing a persistent API key.
