Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 23:30 UTC
docs(changelog): proxy execute same-domain enforcement
Announce that POST /api/v3/tools/execute/proxy now rejects endpoints on a different registrable domain than the connection's base_url (HTTP 400 OriginMismatch), and returns 400 MissingAuthContext when no auth context is supplied. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Co-authored-by: sarthak <sarthak@composio.dev>
Zen Agent committed
Apr 24, 2026 at 06:40 UTC
b7474a523876652a9c12d4e1ed8a5d479a4da884
1 file changed
+60
docs/content/changelog/04-24-26-proxy-execute-same-domain.mdx
new
+60
@@ -0,0 +1,60 @@
1
+---
2
+title: "Proxy execute now enforces same-domain endpoints"
3
+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."
4
+date: "2026-04-24"
5
+---
6
+
7
+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`.
8
+
9
+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.
10
+
11
+### What changed
12
+
13
+- 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.
14
+- Proxy calls that provide neither `connected_account_id` nor `custom_connection_data` now return HTTP `400 MissingAuthContext` instead of being forwarded without auth.
15
+
16
+### Examples
17
+
18
+Assume a connected account whose toolkit `base_url` is `https://api.linear.app`.
19
+
20
+**Allowed — relative endpoint:**
21
+
22
+```bash
23
+curl -X POST https://backend.composio.dev/api/v3/tools/execute/proxy \
24
+ -H 'x-api-key: <YOUR_API_KEY>' \
25
+ -H 'Content-Type: application/json' \
26
+ -d '{
27
+ "endpoint": "/graphql",
28
+ "method": "POST",
29
+ "connected_account_id": "ca_..."
30
+ }'
31
+```
32
+
33
+**Allowed — same registrable domain (different subdomain):**
34
+
35
+```json
36
+{ "endpoint": "https://uploads.linear.app/...", "connected_account_id": "ca_..." }
37
+```
38
+
39
+**Rejected — different registrable domain:**
40
+
41
+```json
42
+{ "endpoint": "https://attacker.example/leak", "connected_account_id": "ca_..." }
43
+```
44
+
45
+Response:
46
+
47
+```json
48
+{
49
+ "error": {
50
+ "code": "OriginMismatch",
51
+ "message": "Endpoint host does not match the connection's base_url host."
52
+ }
53
+}
54
+```
55
+
56
+### What to do
57
+
58
+- If you call proxy execute with absolute URLs, make sure the host matches (or is a subdomain of) the connection's `base_url`.
59
+- Prefer relative endpoints (`/path`) — they are resolved against `base_url` and are not affected by this change.
60
+- 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.