T09 · Insecure Skill Coding Practices
- Location
SKILL.md:553- Finding
API Key Exposure Through URL Query Parameters
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 553, 579, and 743
Vulnerability Type: API credential exposure through URL query strings
Risk Level: MediumVulnerable Code Snippets
At line 553:
markdown 3. URL: `https://prediction.mcp.chainaware.ai/sse?apiKey=your-key-here`At line 579:
markdown 3. URL: `https://prediction.mcp.chainaware.ai/sse?apiKey=your-key-here`At line 743:
markdown - **Claude Web / ChatGPT**: key must be appended to the SSE URL (`?apiKey=...`) — these platforms do not support custom SSE headers. Be aware the key will appear in your browser's network tab. Use a restricted-scope key for these integrations.Technical Analysis
The integration instructions recommend placing
CHAINAWARE_API_KEYin an SSE endpoint's query string. Although HTTPS protects the URL while it is in transit, it does not prevent the complete URL from being retained or exposed at endpoints and intermediaries.Query strings may appear in browser history, client diagnostics, application telemetry, reverse-proxy or server access logs, monitoring systems, support bundles, screenshots, and copied configuration. The Skill acknowledges exposure in the browser's network interface but continues to prescribe query-string authentication.
This credential transmission is not required for integrations that support authentication headers. For clients that cannot provide secure headers, a long-lived API key in the URL remains unsafe and exceeds minimum safe credential-handling privileges.
Attack Path
- A user follows the Claude Web, ChatGPT, or similar integration instructions.
- The user substitutes a valid API key into the
apiKeyquery parameter. - The complete endpoint URL is recorded or displayed in browser diagnostics, client configuration, telemetry, logs, screenshots, or support data.
- An attacker or unauthorized operator obtains access to one of those records.
- The attacker extracts the API key from the ...[truncated 1072 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove examples that place long-lived API keys in query strings.
- Prefer an
AuthorizationorX-API-Keyheader for every supported integration. - Use a platform-provided encrypted secret or credential field where available.
- If a client cannot securely set authentication headers, recommend a trusted local or organizational proxy that injects the credential server-side.
- If URL authentication is unavoidable, issue short-lived, single-purpose tokens rather than account API keys.
- Apply narrow scopes, strict rate and spending limits, short expiration periods, and origin or client restrictions to such tokens.
- Warn users that URLs may be retained beyond the browser network tab, including in history, logs, telemetry, diagnostics, and copied configurations.
- Provide a documented revocation and rotation procedure and advise immediate rotation following suspected disclosure.
- Redact
apiKeyquery parameters in server, proxy, application, and observability logs. - Ensure automatic x402 payment handling requires explicit user authorization and enforce spending limits so credential-free fallback cannot create unexpected charges.
