PortSwigger labs show common web flaws in MCP server tools
Compiled by RedTeamDaily · AI-assisted summaries · Human review not recorded for this version
Published
What happened
This is a training write-up of PortSwigger MCP lab scenarios using an older stateful MCP flow (protocol version 2025-03-26, /mcp endpoint, JSON-RPC over HTTP POST). Lab weaknesses include SQL injection in the listproducts tool argument, object-level authorisation failure in updateemail where the target username is caller-controlled, and staff-only tools (listusers, deleteuser) that are hidden from tools/list but disclosed in initialize instructions and remain callable. No CVE identifiers are given and no real products are reported as affected. Defenders should treat MCP tool arguments as untrusted, use parameterised queries, derive authorisation from the authenticated identity, and enforce tool-level permissions server-side.
For security analysts · Written by AI from 1 source · Report an error
In depth
The article is a practical guide to six PortSwigger Web Security Academy labs focused on MCP servers. It introduces MCP as a way for AI applications to connect to external systems through clients and servers that expose tools, resources and prompts, and argues that an exposed server can be tested like any other API.
The labs cover three weakness classes. In the first, a product-listing tool does not handle its category argument safely, enabling SQL injection. In the second, an email-update tool trusts a username supplied by the caller even though the request is authenticated as a different user. In the third, staff-only tools are omitted from the tool list yet named in the server's initialisation instructions and remain callable.
The write-up describes lab flows and does not reproduce any real incident, affected vendor or CVE. Its scope is limited to the lab setup and older protocol version it uses, which the author notes differ from other MCP versions and transports.
Key points
- The article is a set of six PortSwigger training labs, not a report of a real-world incident or a named vulnerable product.
- The three lab themes are SQL injection, broken object-level access control, and staff-only tools that are hidden but not restricted.
- The article notes that an exposed MCP server is effectively another API surface that can be tested directly.
mcp securitymodel context protocolmcp server vulnerabilitiesbroken access controlsql injectionportswigger labsapi security
- Publishers
- 1
Sources and verification
Sources and editorial review
No named human review has been recorded for this story.
How severity and exploitation labels work · All sources · Report an error
What to do
- Treat MCP tool arguments as untrusted input and use parameterised queries, as for any other API endpoint.
- Enforce object-level authorisation using the authenticated identity rather than a caller-supplied username.
- Enforce function-level permissions on the server for every tool, rather than relying on hiding tools from the tool list.
Written by AI from the sources, checked against them
Source timeline (UTC) · 1 update
1 published report from 1 publisher. Independent confirmations are unverified.
Explore this report
Ask AI about this story
Optional follow-up answers generated from our coverage. Check the linked sources before acting.
Ask your own questionWho and what is in it
Companies