all scenarios

Prompt injection in tool metadata

prompt-injection · Tools — listing

Endpoint (Streamable HTTP)
https://chaos-mcp.thomascdnns.com/s/prompt-injection/mcp
On the wire — recorded from a real request
your clientchaos-mcp01initializePOST /s/prompt-injection/mcp200 OK · application/json · 4 ms"jsonrpc""2.0""id"1"result""protocolVersion""2024-11-05""capabilities""tools""serverInfo""name""chaos-mcp/prompt-injection""version""1.0.0""instructions""chaos-mcp scenario: prompt-injection — Prompt injection in tool metadata"02tools/listPOST /s/prompt-injection/mcp200 OK · application/json · 3 ms"jsonrpc""2.0""id"2"result""tools""name""echo""description""Echo back the provided message.""inputSchema""type""object""properties""message""type""string""description""Text to echo"… 49 more lines

Symptom

what you'll observe

The model's behaviour changes after listing/calling the tool — it follows hidden instructions.

Cause

what this reproduces

Untrusted tool descriptions/results contain instructions aimed at the host model.

Fix

how you'd resolve it

Treat tool metadata as untrusted data; sandbox/marker untrusted content; don't let it steer the agent.

Try it with curl
bash
curl -sS -X POST \
  https://chaos-mcp.thomascdnns.com/s/prompt-injection/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '
"jsonrpc""2.0"
"id"1
"method""initialize"
"params"
"protocolVersion""2024-11-05"
"capabilities"
"clientInfo""name""curl""version""1"

'