subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
"method": "tools/call", "params": {"name": "fetch_api", "arguments": {"url": url, "method": "GET"}} }) r = subprocess.run([ "curl", "-s", "--max-time", "15", "-X", "POST", mcp_endpoint, "-H", f"Authorization: Bearer {api_key}", "-H", "Content-Type: application/json",- Confidence
- 93% confidence
- Finding
- The script sends an API key in an Authorization header to a user-supplied MCP endpoint via curl. Because the endpoint is fully configurable and there is no allowlist, scheme validation, or disclosure/consent, a user can accidentally or maliciously direct credentials to an attacker-controlled server, causing credential exfiltration. In this skill context, the endpoint is specifically intended to carry authenticated browser-backed requests, which increases sensitivity.
