#86 - MCP plugins: your next security blind spot?
An MCP server can inherit the permissions that let an engineer run destructive actions.
18 min read
Is MCP just another server you need to threat model, patch, and monitor? How do you keep users from over-privileged access, block LLM injection, and stop blind spots? We unpack the VentureBeat article - MCP stacks have a 92% exploit probability: How 10 plugins became enterprise security’s biggest blind spot
Your editor is running programs you never read
Think about how the last MCP server got onto your machine. Someone posted a config snippet, you pasted it into mcp.json, and the command in it was uvx or npx followed by a package name and maybe a GitHub URL. Your editor now starts that program every time it launches. It runs as you, with your filesystem, your shell and whatever tokens you handed it. Did you read the code? Do you know whether the person sharing it did?
Do that ten times and somebody has put a number on the odds. Pynt analysed 281 MCP setups and rated 9% of single-plugin setups high risk, 52% at three plugins and 92% at ten. Louis Columbus wrote those figures up for VentureBeat on 8 October 2025 as MCP stacks have a 92% exploit probability. That piece is why we’re writing this one: a customer forwarded it as something that worried them.
Argue with the number if you like, and we will. Pynt’s own page labels those figures high-risk compositions across a sample of setups. That is a softer claim than the probability of being exploited, and neither version counts breaches that happened. The more useful observation is that almost nothing underneath it is new. One attack class here is genuinely novel. The rest is supply chain, credential sprawl and broken authorization, wearing a 2025 label.
An MCP server is a plugin, and you have run plugin systems before
Start with what the thing actually is, because the name misleads.
What is an MCP server, in one sentence?
A program that wraps somebody’s API in a list of functions your model is allowed to call.
Think of it as REST for LLMs. Models are poor at reading API documentation and assembling the right request, but they’re good at picking a function off a list. So you write the function. We’ve written that one for CloudWatch, as a tool rather than a packaged MCP server, though the shape is the same. It runs a CloudWatch Logs Insights query for case-insensitive error, exception and timeout, and hands the matches back. The model doesn’t have to work out pagination or parameter shapes, because an engineer already decided what “look at the logs” means.
Anthropic open sourced the protocol on 25 November 2024. It feels older than that, which tells you something about the pace. The closer analogy than REST is a Jenkins plugin: you’re bringing somebody else’s code into your system and running it there. The first transport in the protocol works exactly that way. stdio means the server is a local process, started by your client, talking over standard input and output.
The supply chain came along for the ride
If it’s a package you install, it inherits everything we already know about packages you install.
What does a malicious MCP server actually look like?
A copy of a real one, with a line added.
In September 2025, Koi Security found postmark-mcp on npm: a near-identical clone of ActiveCampaign’s Postmark MCP server. Version 1.0.16 added one line that blind-copied every outgoing email to an address the author controlled. The Hacker News covered the finding on 29 September, and Postmark said it had “absolutely nothing to do with this package”. The author pulled the package once contacted, which does nothing for anyone who already has it installed and running.
Then there are the ordinary CVEs. mcp-remote, the shim that lets a stdio-only client reach a remote server, carried CVE-2025-6514, a command injection rated CVSS 9.6 that JFrog disclosed on 9 July 2025. A malicious server at the other end could attack the machine that connected to it, and what it got depended on the platform. On Windows, JFrog proved arbitrary OS command execution with full parameter control. On macOS and Linux it got arbitrary executables launched with limited parameter control, because no shell is invoked, and JFrog says full command execution there “may be achievable with further research”. Versions 0.0.5 through 0.1.15 were affected and 0.1.16 fixed it. JFrog calls the package widely used and points at Cloudflare’s own docs as the evidence. VentureBeat also cites a survey of open-source MCP servers whose fourth revision was posted on 20 June 2025. Its authors collected 1,899 servers, narrowed that to the 583 repositories with at least ten stars, and scanned those: “7.2% of MCP server repositories contain at least one security vulnerability, with half of these affected by credential exposure”.
Neither of those is an AI vulnerability class. Trojaned packages and remote code execution in a dependency have decades of literature behind them. What changed is who installs them and how little friction there is in the install.
Poisoned data is the part that is genuinely new
One attack here doesn’t have a pre-AI equivalent, and it’s the one worth your attention.
Why is prompt injection through MCP different from a bad dependency?
The payload arrives in data your tool fetched on purpose, long after every install-time check has passed.
When an MCP server reaches out to a data source and brings text back, that text lands in the model’s context next to your instructions. If someone else can write to that source, they can write instructions. Invariant Labs demonstrated it on the GitHub MCP server in May 2025. A malicious issue on a public repository, an ordinary prompt asking the agent to review open issues, and private repository contents ended up in a public pull request. Their write-up is clear that this is “not a flaw in the GitHub MCP server code itself” but an architectural problem at the agent level.
Look at what that chain used. Reading the issue was harmless by itself, and the leak came from other tools in the same agent’s list: the ones that could read a private repository and open a public pull request. Pynt describes the same shape with a worse ending, a payload served through a web scraping plugin that the client read as an instruction and “forwarded to a downstream shell plugin”.
Injected text can also arrive from the other direction, and that second entry point is the one the survey measures. A server’s tool definitions are text the model reads too, so a poisoned description carries its instructions before any data is fetched. The authors sampled 83 of their 583 repositories and completed 73 scans, which detected potential tool poisoning in 5.5% of them. Their scanner, Invariant Labs’ mcp-scan, reads the tool descriptions a server exposes rather than its source code. Treat that as evidence the class is real, not a rate you can plan around. It isn’t a number for the attack above, where the instructions ride in on data a legitimate tool fetched on purpose. These studies don’t establish how often legitimate tools return injected instructions in production.
The web version of that attack is already in the wild. A page carries text no human reader sees, styled or positioned out of view, and the crawler that feeds an agent reads it anyway. A clean dependency scan doesn’t establish that fetched content is safe. The package was clean when you installed it, and Invariant says its own security analyzer is what caught the flow.
Moving the server off the laptop moves the blast radius
Given the code is going to run somewhere, the next question is where.
Does running the MCP server somewhere else fix the RCE problem?
It relocates the server’s execution to a host you can contain, and leaves your client and any local proxy where they were.
CVE-2025-6514 is the demonstration. The vulnerable code was mcp-remote on the workstation, and the thing that triggered it was the remote server at the other end of the connection. Remote hosting moves one class of problem and not the other.
A stdio server can run in a container rather than straight on your machine. Docker isn’t a security system and container escape is a thing, so don’t call it a sandbox. A process with a restricted filesystem and restricted network is still a smaller problem than the same process holding your SSH keys. Docker’s MCP Toolkit, built into Docker Desktop since 4.42 in June 2025, does this by default: servers run in isolated containers instead of as host-level npx or uvx processes.
The protocol’s other transport changes the shape entirely. Streamable HTTP, added in the 2025-03-26 revision, means the server really is a server, reached over HTTP. Your workstation stops being the thing that runs the server’s code. In exchange you now have to trust whoever operates that server, which is a different question and not obviously an easier one.
For your own tools, self-hosting splits the difference. If you’re running Grafana and want a Grafana MCP server, put it on ECS inside your network and reach it over the VPN. An RCE in that server is then an incident on a host you own, scoped and monitored, rather than on the laptop with your production credentials on it.
Credential scoping depends on the system
Wherever the server runs, it needs something to authenticate with, and that’s where this stops being tidy.
What credentials should an MCP server get?
The narrowest ones the task needs, though how easily you can mint those varies by system.
The local case is already uneven. Some servers read a named environment variable, which is workable. Others want the secret in plain text inside mcp.json. That file lives in your project or your home directory, and it gets copied into dotfile repos, shared in onboarding docs and pasted into chat. For a remote server, insist on HTTPS, and then stop and think hard before handing over your own credentials at all.
The sharper problem is what those credentials can do. An MCP server can expose tools that delete things. If it’s authenticating as you and you’re an admin, the model can reach a destructive tool without much deliberation on the way. The answer in principle is a scoped credential: an identity for the MCP server that reads what it needs and changes nothing else. How hard that is depends on the system. AWS has documented fine-grained session permissions since May 2019. You pass a session policy when the role is assumed. Effective permissions are the intersection of that session policy and the role’s identity policies, so the session policy can only narrow what the role already grants. Elsewhere it ranges from fiddly to absent, and you end up choosing between an over-powered token and not using the tool.
A gateway centralises authentication, not authorization
VentureBeat’s first recommendation is the one that translates straight into tooling, so it deserves a fair hearing before the objection.
Do MCP gateways solve the access problem?
They solve registration and authentication. Authorization is a separate decision, and it has to be enforced on every path that reaches the data.
The recommendation is to implement MCP gateways “by first enforcing OAuth 2.1 and OpenID Connect while centralizing MCP server registration”. The protocol has caught up with half of that. The 2025-06-18 authorization spec makes a protected MCP server an OAuth 2.1 resource server. It must publish Protected Resource Metadata per RFC 9728, and check that an access token names it as the intended audience per RFC 8707. Passing the token straight through to an upstream API is out. That’s real, and a gateway that enforces it beats a dozen servers each inventing their own scheme.
Here’s the gap. A gateway aggregates calls and then talks to the backend on your behalf, which is tempting to implement with one shared service credential. The moment you do, the backend sees the gateway, not you. It’s the GraphQL pattern: the layer in front knows who you are, and a service account does the fetching. That works only if per-object rules are still evaluated against the caller the gateway authenticated, rather than against the service account. Skip that and you’ve built a route to data by identity confusion, which is API1:2023 Broken Object Level Authorization, the top entry on the OWASP API Security Top 10.
At one client, the platform provider said it checked permissions again at the API layer, after the agent or the gateway had already decided. Authentication alone doesn’t establish object-level access. The gateway can be the place that enforces it, as long as it holds caller and resource context it can trust: OPA exists to separate the policy decision from the policy enforcement point, so one decision can be enforced at several points. What you can’t do is leave a path to the data that goes around whichever points you picked.
Layer one we buy, layers two and three we don’t
The article’s defence strategy has three layers, and they’re not of equal quality.
Which of the recommended layers can you actually build today?
The authentication layer, because gateways and OAuth 2.1 exist and are specified.
Layer two is semantic layers. The article calls them “essential for bringing greater context to each access decision, ensuring agents work only with standardized, trusted, and verifiable data”. Read that twice and the only operational idea in it is embedding policy into data access, which is a reasonable thing to want. The article doesn’t say how you’d do it. Layer three is knowledge graphs for visibility, and it arrives bundled with guardrails, monitoring and audit logs. Those are three different disciplines, and none of them needs a graph database. Mixing them makes the recommendation unactionable.
The quote the article closes that section with stands on its own, though, and it’s from Merritt Baer, Chief Security Officer at Enkrypt AI:
Agreed, and none of that requires a knowledge graph.
Fewer plugins, the Jenkins lesson
Which brings us back to the number in the headline, and to the only recommendation on the list that costs nothing.
What is the single cheapest thing you can do about MCP risk?
Install fewer of them.
The Jenkins comparison carries further than the risk curve. Plugins depend on plugins, and once that matrix exists you stop being able to control which versions you’re actually running. Anyone who has debugged a Jenkins upgrade knows how that ends.
There’s a second cost that has nothing to do with security. When a client registers an MCP server, the server returns its full list of tools, and conventionally those definitions go into the context window before you’ve typed anything. One of the AWS Well-Architected MCP servers hands over something like 40 to 50 tools, as far as we could tell. Anthropic’s engineering post on code execution with MCP, published 4 November 2025, is blunt about the arithmetic: “Most MCP clients load all tool definitions upfront directly into context”. One workflow they rebuilt dropped “from 150,000 tokens to 2,000 tokens”.
That “most” is the interesting word, because the same post sketches the alternatives. Present the servers as code on a filesystem and the agent reads each tool definition only when it needs it. The post calls that progressive disclosure. A search_tools tool inside the server does the same job without the filesystem. Whether you get anything like that depends on your client. VS Code shipped experimental tool grouping on 7 August 2025, for requests that pass the 128-tool limit: tools are grouped automatically and “the model is given the ability to activate and call groups of tools”, with the threshold set by github.copilot.chat.virtualTools.threshold. There is a blunter control as well. Cursor documents a toggle for each server, and says “disabled servers won’t load or appear in chat”. Under the conventional upfront loading, everything you leave switched on costs you context in every session.
What this means for teams
The pressure to adopt usually isn’t coming from the people who’d have to secure it. We see leadership buying tools and asking for AI to be prioritised so the organisation looks current, then not much usage following. We don’t read the risk the same way. Mattias’s worry is speed and audience: people who have never installed a package are being told to run uv against a GitHub URL. Educating actual developers out of that habit was already hard. Andrey’s read from client conversations is that adoption is lagging the enthusiasm, and that most real usage is still advanced code completion. Both can be true, and the second one is the window you have to get the guardrails in before the first one catches up.
Four things worth doing this week:
- Open your
mcp.jsonfiles and count. For each server, name the system it reaches and the credential it holds. Delete the ones you added to try out and never removed. - Grep those same files for secrets in plain text. Move them to a secret store or a named environment variable, and rotate anything whose copies you can’t account for.
- For every server that fetches text from somewhere strangers can write, decide whether you need it. A read-only credential on that server isn’t enough, because injected text can use the rest of the agent’s tools. List what else that agent can reach and how data can leave it, a shell tool, a file write, anything that can push or post, then cut that combination down to the job.
- Pick one server that matters and give it a scoped identity instead of yours. You’ll find out quickly whether the system behind it supports that, and that answer is worth having before an incident asks for it.
Common questions, answered
How do I stop an MCP server from reading my whole AWS account?
Give it its own IAM role with a read-only policy scoped to the services it needs, and stop passing your own credentials through. An MCP server authenticates as whatever you hand it, so admin credentials let it call any destructive tool it exposes. Support for issuing a reduced copy of your own permissions varies by system, so check before you install. If the only available credential is a powerful one, that’s a reason not to run the server.
Is it safe to put API keys in mcp.json?
No, keep the key out of the file and point the server at a named environment variable or a secret store. The real problem is plaintext: the secret sits in the file unprotected, and the file travels into project directories, dotfile repositories, onboarding documents and chat messages. File permissions and disk encryption don’t follow those copies, and an environment variable is no vault either. Some MCP servers accept only a literal value there, which is a reason to prefer one that doesn’t. If a key has been in there and you can’t reasonably rule out that a copy escaped, rotate it.
What is the difference between a local and a remote MCP server?
A local server is a process your client starts on your own machine over stdio. A remote one is reached over HTTP, using the Streamable HTTP transport added in the 2025-03-26 spec revision. The local kind runs with your permissions on the machine holding your credentials, so a vulnerability in it is a vulnerability on your workstation. The remote kind moves the server’s code off your laptop and replaces it with a trust decision about whoever operates the server. Your client and any local proxy still run code of their own, so the surface shrinks rather than disappears.
Related episodes
- #82 Tools, MCPs, and attack scenarios: how tool calling works, why a local MCP server runs with its user’s permissions, and the attack scenarios that follow.
- #81 Keeping secrets safe: which secret stores fit which consumer, and where teams stumble. Relevant the moment you decide what credential an MCP server gets.
- #84 AI for DevSecOps: current wins and ongoing gaps: what the tooling does well today and where it still falls short, which is the backdrop to the adoption gap above.
Resources
- MCP stacks have a 92% exploit probability, VentureBeat, 8 October 2025. The article this piece argues with, including the five-point action plan for security leaders.
- Quantifying Risk Exposure Across 281 MCPs, Pynt. The research behind the 9%, 52% and 92% figures, and the markdown parser, scraper and shell plugin chain. Worth reading before you quote the numbers: the page calls them high-risk compositions, and the full report is gated.
- Model Context Protocol (MCP) at First Glance, v4, 20 June 2025. Where the 7.2% and 5.5% come from, and the sample sizes behind each: 583 repositories scanned with a static analyzer, 73 of 83 sampled for a tool-description scan.
- MCP specification 2025-06-18: Authorization. Settles what a protected MCP server must do with OAuth 2.1, RFC 9728 metadata and RFC 8707 audience validation.
- Introducing the Model Context Protocol, Anthropic, 25 November 2024. The original announcement, and the date the protocol actually shipped.
- CVE-2025-6514: critical RCE in mcp-remote, JFrog, 9 July 2025. Affected versions, the CVSS 9.6 rating, and why the impact differs between Windows and the Unix platforms.
- GitHub MCP exploited: accessing private repositories via MCP, Invariant Labs, May 2025. The working prompt injection demo, and why the authors call it an agent-level problem.
- Code execution with MCP, Anthropic, 4 November 2025. Measures what loading every tool definition upfront costs you, and describes reading definitions on demand instead.
Since we recorded
Anthropic put on-demand discovery into its API three days later as the Tool Search Tool, which defers tool definitions until the model asks for them and cuts token use by 85% on its own numbers. The 2026-07-28 specification has since replaced the revision above, and authorization is the part to read: clients must validate the RFC 9207 iss parameter before redeeming a code. It also binds client credentials to the issuer that minted them, and deprecates Dynamic Client Registration in favour of Client ID Metadata Documents. The credential question we left open came back in #111 AI Agents: When Helpful Becomes Harmful, where written guardrails turned out to need access controls behind them.
