Skip to main content
Glama

Escudo de Rebinding DNS

detect_dns_rebinding_risk

Analiza el código que arma el transporte HTTP/SSE de un servidor MCP (el endpoint que un cliente usa para hablarle por JSON-RPC) en busca de la ausencia de validación del header Origin (o Host) antes de procesar peticiones entrantes. Sin esa validación, una página web maliciosa que el navegador de la víctima visita puede hacer que el navegador hable directamente con ese servidor MCP — que suele correr en localhost o en la red interna del usuario — como si fuera un cliente de confianza (ataque de "DNS rebinding"): el atacante registra un dominio que primero resuelve a su propio servidor y luego cambia el DNS para que resuelva a 127.0.0.1, y el navegador sigue tratando la página como el mismo origen mientras habla con el servidor local de la víctima. Detecta además un malentendido documentado propio de Garita: creer que bindear el servidor solo a localhost/127.0.0.1 ya protege — eso NO evita el rebinding; la única defensa real es validar el header Origin contra una lista explícita de orígenes permitidos. Motivada por un patrón repetido en 2026, encontrado de forma independiente en tres SDKs/implementaciones de MCP en tres lenguajes distintos: CVE-2026-42559 (CVSS 8.8) en rmcp, el SDK oficial de Rust; CVE-2026-35568 en el SDK de Java; y CVE-2026-59971 en mysql-mcp-server (Python) — todas por la misma causa raíz. Es un análisis estático por patrones de texto sobre el código de configuración del transporte (no abre ningún puerto ni ejecuta nada) — mismo enfoque que detect_ssrf_risk y detect_command_injection_risk. Requiere una llave de acceso válida (usos gratis o créditos) — ver POST /crear-llave.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "codigo": "<codigo>"
    },
    "name": "detect_dns_rebinding_risk"
  }
}

Input Schema

NameRequiredDescriptionDefault
codigoYesEl código que arma el transporte HTTP/SSE del servidor MCP (constructor de transporte o registro de la ruta), en texto plano.
lenguajeNoSolo informativo (ej. "python", "javascript") — la detección ya cubre varios lenguajes a la vez, este campo no cambia el resultado.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full burden, and it does disclose important behavior: it is static text-pattern analysis that opens no ports and executes nothing, and it requires a valid key. That is genuinely useful. However, it says nothing about what the analysis returns (finding shape, severity, confidence, false-positive behavior), which is a meaningful gap for a scanner with no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose is front-loaded, but the body is heavily padded with an extended explanation of the DNS rebinding attack, three CVE references, and project-specific motivation. Some of that supports trust and urgency, yet much of it does not help an agent decide or call the tool correctly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter static scanner with no annotations and no output schema, the definition covers purpose, safety profile, prerequisites, and detection logic well enough to invoke correctly. The main missing piece is a description of the return value, which the absent output schema leaves entirely undocumented.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and both parameters are documented in the schema, so the baseline is 3. The description restates the 'codigo' parameter's meaning but adds no syntax, format, or sizing guidance beyond it, and does not mention 'lenguaje' at all, so it does not exceed the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: static analysis of the code that builds an MCP server's HTTP/SSE transport, looking for missing Origin/Host header validation. It is unambiguous about scope and explicitly contrasts its approach with named siblings (detect_ssrf_risk, detect_command_injection_risk), so an agent can place it in the catalog without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear usage context — inspecting transport configuration code for Origin validation — and clarifies a common wrong assumption (binding to localhost is not protection), which effectively tells the agent when this check still applies. It also states the access-key prerequisite and where to get one. It stops short of explicit 'use X instead when Y' routing among the other detect_* siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources