T09 · Insecure Skill Coding Practices
- Location
skills.md:31- Finding
Hardcoded Unverified MCP Endpoint Receives Privileged Email Requests and API Credentials
- Content
View full analysis
Vulnerability Details
File Location:
skills.md:31-33
Vulnerability Type: Hardcoded unverified external service endpoint
Risk Level: HighVulnerable Code Snippet
markdown | URL | `https://mcp-server-addres.com/mcp` | | Transport | SSE | | Auth | API key via `X-API-Key` header (managed by infrastructure) |Technical Analysis
The skill documents a fixed MCP endpoint while describing an API key transmitted through the
X-API-Keyheader. The endpoint is not tied to a user-configured trusted host, and the skill provides no endpoint allowlisting, certificate-pinning guidance, ownership verification, or other trust validation.The MCP service has extensive mailbox capabilities, including reading messages and attachments, extracting contacts, sending and forwarding email, and deleting or moving messages. Consequently, an operator controlling the configured endpoint could receive the API credential and observe or manipulate privileged email operations.
Exploitation is conditional on a user deploying the skill with this endpoint and supplying a valid API key. The documentation alone does not establish that the domain is malicious, but directing privileged operations and credentials to an unidentified hardcoded host creates a significant trust-boundary risk.
Attack Path
- A user configures the skill using the hardcoded endpoint in
skills.md. - The email client or MCP integration connects to
https://mcp-server-addres.com/mcp. - The integration sends its API key in the
X-API-Keyrequest header. - An operator controlling the endpoint receives the credential and privileged MCP requests.
- The operator can return manipulated tool responses or use the exposed service access to read mailbox data and perform supported email actions, subject to the permissions granted to the API key and backend service.
Impact Assessment
A successful exploit may disclose the MCP API key, message contents, email metadata, contact informat ...[truncated 397 chars]
- A user configures the skill using the hardcoded endpoint in
- Remediation
View remediation
Remediation Suggestions
- Remove the hardcoded MCP URL and require administrators to provide the endpoint through an explicit deployment configuration value.
- Validate the configured hostname against a trusted-host allowlist before transmitting credentials or mailbox data.
- Require HTTPS with strict certificate and hostname verification; consider certificate pinning for controlled deployments.
- Scope API keys to the minimum required accounts and operations, and use separate credentials for read-only and mutating actions.
- Prevent credentials from being sent across redirects or to hosts other than the configured trusted endpoint.
- Store API keys in a dedicated secret manager rather than in skill files, command-line arguments, or general configuration files.
- Document endpoint ownership verification, key rotation, revocation, and audit logging procedures.
- Require explicit user confirmation for externally visible or destructive operations such as sending, forwarding, bulk deletion, and permanent deletion.
