Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
docs(changelog): proxy execute same-domain enforcement
Zen Agentb7474a523876
diff --git a/docs/content/changelog/04-24-26-proxy-execute-same-domain.mdx b/docs/content/changelog/04-24-26-proxy-execute-same-domain.mdxnew file mode 100644index 000000000..2671a719d--- /dev/null+++ b/docs/content/changelog/04-24-26-proxy-execute-same-domain.mdx@@ -0,0 +1,60 @@+---+title: "Proxy execute now enforces same-domain endpoints"+description: "The /api/v3/tools/execute/proxy endpoint rejects requests whose endpoint URL is on a different registrable domain than the connected account's base URL."+date: "2026-04-24"+---++To prevent a connection's `Authorization` header from being forwarded to an unintended host, the proxy execute endpoint (`POST /api/v3/tools/execute/proxy`) now requires that the outbound `endpoint` URL share the same scheme and registrable domain (eTLD+1) as the connection's resolved `base_url`.++Cross-subdomain requests on the same registrable domain continue to work — for example, a Gmail connection with base `https://gmail.googleapis.com` can still call `https://www.googleapis.com/...`. Relative endpoints (`/users/me/messages`) are resolved against the connection's `base_url` as before and are unaffected.++### What changed++- Absolute `endpoint` URLs on a different registrable domain than the connection's `base_url` are rejected with HTTP `400 OriginMismatch`. The upstream request is never made.+- Proxy calls that provide neither `connected_account_id` nor `custom_connection_data` now return HTTP `400 MissingAuthContext` instead of being forwarded without auth.++### Examples++Assume a connected account whose toolkit `base_url` is `https://api.linear.app`.++**Allowed — relative endpoint:**++```bash+curl -X POST https://backend.composio.dev/api/v3/tools/execute/proxy \+ -H 'x-api-key: <YOUR_API_KEY>' \+ -H 'Content-Type: application/json' \+ -d '{+ "endpoint": "/graphql",+ "method": "POST",+ "connected_account_id": "ca_..."+ }'+```++**Allowed — same registrable domain (different subdomain):**++```json+{ "endpoint": "https://uploads.linear.app/...", "connected_account_id": "ca_..." }+```++**Rejected — different registrable domain:**++```json+{ "endpoint": "https://attacker.example/leak", "connected_account_id": "ca_..." }+```++Response:++```json+{+ "error": {+ "code": "OriginMismatch",+ "message": "Endpoint host does not match the connection's base_url host."+ }+}+```++### What to do++- If you call proxy execute with absolute URLs, make sure the host matches (or is a subdomain of) the connection's `base_url`.+- Prefer relative endpoints (`/path`) — they are resolved against `base_url` and are not affected by this change.+- If your integration legitimately needs to span multiple registrable domains for the same connection, reach out to us so we can add the additional host to the toolkit allowlist.