T09 · Insecure Skill Coding Practices
- Location
scripts/odoo_mcp.py:48- Finding
Bearer Token Can Be Transmitted to an Unencrypted MCP Endpoint
- Content
View full analysis
int: url, token = _config() if not url or not token: return _fail( "config_error", "Set ODOO_MCP_URL and ODOO_MCP_TOKEN before using this skill.", code=2, ) headers = {"Authorization": f"Bearer {token}"} ``` ### Technical Analysis The MCP endpoint is taken directly from the `ODOO_MCP_URL` environment variable and passed to `streamablehttp_client` without validating its URL scheme or destination. The static Odoo MCP token is then added to every connection as an `Authorization: Bearer` header. Although the documentation recommends an HTTPS example, the implementation does not reject `http://` endpoints. If a plaintext HTTP URL is configured, the bearer token and MCP traffic may traverse the network without confidentiality or server authentication. A network-positioned attacker could intercept the token, while a maliciously configured endpoint would receive it directly. The token is described as the `drivethru.mcp_key`. Its effective privilege is determined by the remote Odoo MCP server, but the documented tools include manufacturing-data reads and live scheduling writes. ### Attack Path 1. An attacker influences deployment configuration, installation instructions, shell environment, or another mechanism that controls `ODOO_M ...[truncated 1481 chars]- Remediation
View remediation
str: parsed = urlsplit(url) if parsed.scheme != "https": raise ValueError("ODOO_MCP_URL must use HTTPS.") if not parsed.hostname or parsed.username or parsed.password: raise ValueError("ODOO_MCP_URL is invalid.") return url ``` ]]>
