Lab: SQL injection in an MCP server tool
This lab's shop exposes a Model Context Protocol (MCP) server at /mcp so that AI assistants can browse the product catalog. One of the server's tools passes its arguments into a SQL query without sanitizing them.
To solve the lab, use the MCP server to retrieve the administrator's password, then log in as the administrator user.
Hint
MCP servers speak JSON-RPC 2.0 over HTTP. Start by sending an initialize request, then use tools/list to find out which tools exist and which arguments they take.
Required knowledge
To solve this lab, you'll need to know:
- How to call tools on an MCP server.
- How to use a UNION attack to retrieve data from other database tables.
For more information, see our MCP server vulnerabilities Academy topic and our SQL injection UNION attacks topic.
Solution
The solution for this lab will be published shortly. Check back soon.