Model Context Protocol (MCP) servers are critical infrastructure for AI agents - enabling access to tools, documents, and local environments. We’ve already blogged about top risks MCPs present in IDEs, and about the three types of MCP risks and how to assess them.
Now let’s understand some of the research findings behind the curtain. The Backslash team conducted research across thousands of publicly available locally-executed MCPs and analyzed their code for a wide range of security risks - including prompt injection, data manipulation, and malicious payload execution.
The Backslash team analyzed thousands of publicly available MCP servers. At the time of writing, we covered about half of what is available, and this is an ongoing effort. We scanned MCPs for code vulnerabilities and other weaknesses, and also checked them for malicious patterns, including:
While our analysis did not yield obviously malicious MCPs, we did find a startling number of dangerously misconfigured or carelessly built servers. We identified two pervasive categories of weaknesses, which when combined can cause very high risk to the user’s environment and applications.
The most common issue we found, with hundreds of cases observed, was MCP servers that were explicitly bound to all network interfaces (0.0.0.0), making them accessible to anyone on the same local network.
Real-world risk: Imagine you’re coding in a shared coworking space or café. Your MCP server is silently running on your machine. The person sitting near you, sipping their latte, can now access your MCP server, impersonate tools, and potentially run operations on your behalf. It’s like leaving your laptop open - and unlocked for everyone in the room.
Code example:
This code exposes the MCP server to anyone on the network by binding it to all interfaces (0.0.0.0).
The second most common issue, dozens of instances, MCP servers were discovered that allow arbitrary command execution on the host machine. Whether it’s through careless use of a subprocess, a lack of input sanitization, or security bugs like path traversal.
Real-world risk: The MCP server can access the host that runs the MCP and potentially allow a remote user to control your operating system.
Code Example:
At first glance, this function seems simple, it takes a string (command) and executes it as a shell command on the system. Whatever the output is, it returns as a string.
But there's a serious problem. This code blindly trusts the input it receives and executes it directly on the system's shell. If an attacker controls the command input , they can run any system command they want.
Some examples of what can be executed:
When network exposure meets excessive permissions, you get the perfect storm. Anyone on the same network can take full control of the host machine running the MCP server - no login, no authorization, no sandbox. Simply full access to run any command, scrape memory, or impersonate tools used by AI agents.
And yes, we found several servers with this exact combination.
Beyond code execution, MCPs can serve as stealthy pathways for prompt injection and context poisoning. Malicious or manipulated public content can change what an LLM sees - returning misleading data, or rerouting agent logic.
As part of this research, in a yet-to-be-released finding, we identified an exploit path involving a seemingly benign public document that becomes the trigger for a cascading compromise - because the MCP silently connected it into the LLM agent’s logic without proper boundaries. The issue wasn’t a vulnerability in the MCP code itself, but rather in the configuration of the data source it accessed. This issue affects a very popular tool with 10,000s of users, and we’re currently working with the vendor to coordinate responsible disclosure.
To support the community, we launched the Backslash MCP Server Security Hub - a live, searchable MCP risk database. It includes data from unverified publishers, while findings from verified repos are under responsible disclosure.
We encourage anyone considering using an MCP server to first look it up on the Hub, in order to ensure it is safe to use.
Backslash also offers a free self-assessment tool that scans your developers’ environment for:
You’ll get visibility in minutes - and it’s free (requires registration)
Backslash Self-Assessment Dashboard: Backslash MCP Server Security hub: https://mcp.backslash.security
If you’re planning to write your own MCP (which is very easy to do) - be sure to follow these best practices:
stdio
transport for local MCP tools instead of SSE
(Server-Sent Events). If SSE is required locally, restrict access to 127.0.0.1 only