T09 · Insecure Skill Coding Practices
Error
- Location
- README.md:56
- Finding
- Wallet Private Key Disclosed Through Remote MCP URLs<![CDATA[ ## Vulnerability Details **File Location**: `README.md:56-59` **Vulnerability Type**: Wallet private key exposure through URL query parameters **Risk Level**: Critical ### Vulnerable Code ```text ### 3. n8n / remote connections HTTP Streamable: https://mcp.asrai.me/mcp?key=0x<your_private_key> SSE (legacy): https://mcp.asrai.me/sse?key=0x<your_private_key> ``` ### Technical Analysis The documented configuration requires the user to place a wallet private key directly in the query string of a URL sent to an external service. URL query strings are commonly retained in destination-server access logs, reverse-proxy logs, browser history, monitoring systems, error reports, and network diagnostics. HTTPS protects the request while it is in transit but does not prevent the remote endpoint or terminating infrastructure from reading and recording the URL. A wallet private key is not an authentication token that can safely be disclosed to a service. Anyone who obtains it can independently sign transactions as the wallet owner. This design also conflicts with the safer local-signing model implied elsewhere in the project. ### Attack Path 1. A user follows the remote MCP setup instructions. 2. The user substitutes an actual wallet private key into the `key` query parameter. 3. The MCP client sends the complete URL to `mcp.asrai.me`. 4. The external service, reverse proxy, observability platform, browser, or another logging component records the URL. 5. An attacker or unauthorized operator with access to those records extracts the private key. 6. The attacker imports the key into another wallet and signs unauthorized transactions. 7. Assets controlled by the wallet can be transferred or spent without further authorization. ### Impact Assessment Successful exploitation provides full cryptographic control over the affected wallet rather than access limited to this Skill. An attacker could sign arbitrary transactions, transfer tokens, approve malicious ...[truncated 292 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Remove all instructions that place wallet private keys in URLs, headers, request bodies, or remote configuration. - Perform x402 payment signing locally with a reviewed client so the private key never leaves the user's device. - Use a dedicated wallet containing only the minimum funds required for payment. - If the remote MCP service requires authentication, issue a scoped, revocable service token unrelated to the wallet private key. - Prevent secrets from being written to browser history, command history, logs, telemetry, and error reports. - Add automatic secret redaction to clients and infrastructure. - Clearly document the trust boundary and state that users must never disclose seed phrases or private keys. - Treat previously submitted keys as compromised and instruct affected users to migrate assets to newly generated wallets. ]]>
