T09 · Insecure Skill Coding Practices
- Location
SKILL.md:270- Finding
Device MCP Passcode Transmitted over Plaintext HTTP and Exposed in Process Arguments
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:266-271;rules/connect-local-device.md:59-64
Vulnerability Type: Plaintext credential transmission and command-line secret exposure
Risk Level: HighVulnerable Code
SKILL.md:266-271:bash # Bridge a device's MCP endpoint (requires passcode as Bearer token) npx mcporter --url http://<device-ip>:19851/mcp --header "Authorization: Bearer <passcode>"rules/connect-local-device.md:59-64:bash Use [mcporter](https://mcporter.dev) to bridge the device's MCP endpoint so Claude Code (or other MCP clients) can interact with it directly: ```bash mcporter call --url http://<device-ip>:19851/mcp --header "Authorization: Bearer <passcode>"text ### Technical Analysis The instructions place an authentication passcode in an HTTP `Authorization` header while using an unencrypted `http://` endpoint. HTTP does not provide transport confidentiality or server authentication. A party able to observe or manipulate local-network traffic may recover the bearer credential or redirect the connection to an attacker-controlled endpoint. The passcode is also embedded directly in the command-line arguments. Depending on the operating system and process isolation settings, command arguments may be visible to other local processes, process-monitoring utilities, shell history, terminal logging, or diagnostic collection. Authentication is necessary for the declared MCP debugging functionality, but transmitting the credential without encrypted transport and placing it in a process argument exceeds the minimum safe exposure required. ### Attack Path 1. A user enables local debugging and MCP on a BRICKS device. 2. The user executes the documented `mcporter` command with the device passcode. 3. An attacker on the same network captures plaintext HTTP traffic, performs an active man-in-the-middle attack, or observes the local process c ...[truncated 726 chars]- Remediation
View remediation
Remediation Suggestions
- Require HTTPS with proper certificate validation or mutually authenticated TLS for the MCP endpoint.
- Do not silently fall back to plaintext HTTP.
- Pass credentials through a protected input mechanism, such as an interactive secret prompt, restricted credential file, or supported secret descriptor, rather than command-line arguments.
- Ensure credentials are redacted from logs, diagnostics, error output, and process telemetry.
- Use short-lived, device-specific, narrowly scoped tokens instead of reusable passcodes.
- Bind the MCP service only to trusted interfaces and enforce network-level access controls.
- Rotate any passcode that may already have been used through the documented command.
