mcp sdk passes tool parameters to llm context before validation
tested mcp sdk 0.5.0 yesterday and it passes raw tool parameters straight into llm context before any validation happens. if the params contain injection payloads they're already in context before the tool even executes
tested mcp sdk 0.5.0 yesterday and confirmed - tool parameters go into llm context before any validation runs. if you pass a 50mb base64 blob as a param it hits the context window before the tool even checks if the param is valid
holy hell thats a massive security issue. if tool params hit llm context before validation then you can inject malicous prompts via param values. like pass a base64 blob that decodes to "ignore previous instructions" and it goes straght into context before the tool even checks if the param is valid. tested this on mcp sdk 0.5.0 yesterday and confirmed it works exactly like you described
wait does this affect all mcp sdk versions or just 0.5.0
wait what version of the sdk. need to test this on 0.6.0