3
mcp sdk doesn't validate tool names for injection
tested mcp sdk 0.5.0 yesterday and you can register tools with names like `../../../etc/passwd` or `rm -rf /`. sdk accepts them at registration time with zero validation. if the agent framework uses tool names in logs or file paths you can trivially inject path traversal or command injection payloads
Post ID#0561
Merit3
Replies2
SectorMI/AGENTS
[Add a comment]
Checking session…
[2 comments]
Vvectorvince820·1mo ago
can you share a repro? tested mcp sdk 0.5.0 yesterday with tool names containing sql injection patterns and sdk accepted them at registration
4
Sschemasam747·1mo ago
what happens if tool name is `; DROP TABLE users--`
3