Dev.to Security 🔐 Cybersecurity 👁 1 📖 16 min read

No login required: the most common MCP vulnerability

Research · MCP security It is not an injection. It is a server that answers anyone. We read the code of 4,133 open-source MCP servers and checked 6,265 of our scanner's findings against it. 204 were real. Here is what t

No login required: the most common MCP vulnerability

Research · MCP security

It is not an injection. It is a server that answers anyone. We read the code of 4,133 open-source MCP servers and checked 6,265 of our scanner's findings against it. 204 were real. Here is what they look like, how to check your own server, and what it took to trust the result.

Dmitry Sergeev, DevLab · data as of 2026-11-30 · unfixed projects are not named

An MCP server can pass every injection check and still let anyone on the same network use its tools and your API keys. Of the 137 vulnerabilities we confirmed, 54 were exactly that: a server that answers without a login. So were 18 of the 36 we rate high, more than all injection classes together (17). In 33 of the 54 the door is a mode the project offers and the user switches on: an --http flag, an SSE script or a Docker recipe. Six projects have already fixed what we reported; the links are below.

One case, start to finish. mcp-discord has a self-host HTTP mode, also the default of its Docker image. It listened on every interface with no token, so anyone who could reach the port could drive the user's Discord bot. We reported it by email on November 23. The same day the maintainer released v1.5.3, which listens on 127.0.0.1 unless told otherwise and does not start without a token; the advisory GHSA-4c5x-38cw-mrcx followed the next day. We checked the fix at the release tag.

4,133 servers read; 204 of 6,265 findings were real; 137 confirmed vulnerabilities

From servers to fixes

From servers to fixes; each bar names its unit. A vulnerability often rests on several findings, and some were found while reading the code around a finding.

1. What the real ones look like

Confirmed vulnerabilities by class and severity

137 confirmed vulnerabilities in 129 servers, by class and by our severity (36 high, 46 medium, 55 low). 38 design weaknesses are kept as advice and not counted. How severity is set: see "Method".

Seven patterns repeat across very different projects. The code below is simplified and written for this article; it is not taken from any one server.

The opt-in network mode
A server that is safe over stdio gets an HTTP or SSE mode for "remote use". It listens on every interface, checks nothing, and runs every tool with the operator's own keys for whoever connects.

How the servers that answer without a login get on the network

The 54 vulnerabilities of this class, in 53 servers, by how the server gets on the network.

The opt-in network mode: the pattern and the fix, in Python

No token, no HTTP mode; the token is checked on every request; loopback unless the operator says otherwise. We count the opt-in mode as a vulnerability when the project offers it to its users, nothing in its docs says it has no sign-in, and an anonymous caller gets the operator's credentials and tools. The MCP specification asks the same of HTTP servers: validate the Origin header, bind to localhost when run locally, authenticate every connection.

Localhost is not private
A server bound to 127.0.0.1 still answers the web pages its user opens. With CORS open and no token, a web page can drive its tools. Five of the 54 listen only on localhost and are still reachable this way; all five are rated high.

Localhost is not private: the pattern and the fix, in TypeScript

In many browsers the user only has to open a page; recent versions of Chrome ask the user before a public site may reach localhost, but not every browser does. Without the Host check, DNS rebinding reaches the server even without CORS.

Quotes are not escaping
Quotes are not escaping: the pattern and the fix, in JavaScript

Double quotes inside a shell string stop spaces, not command substitution.

The option is the payload
The option is the payload: the pattern and the fix, in Python

An argument list stops the shell, not the program's own option parser. Put -e or -- before every value the caller chooses.

A dot is a valid id
A dot is a valid id: the pattern and the fix, in Python

Check the resolved path, not the characters. The same shape deletes, overwrites or reads whole folders in other tools.

Guards that check the wrong thing
Guards that check the wrong thing: the pattern and the fix, in Python

The same family: a read-only mode that blocks one tool and forgets three, a permission check that reads the first keyword of a query that runs several.

Your key, their host
Your key, their host: the pattern and the fix, in Python

A tool that lets the caller choose the host must never send the operator's key there.

2. Why we checked 6,265 findings to confirm 137

Findings checked against the code: real, doing its job, noise, undecided

6,265 findings checked by our team against the code, over the whole project and all scanner builds; each finding counted once, by its latest verdict. "Doing its job": the tool exists to do exactly that.

Early on we took all 51 high-severity dataflow findings the scanner raised on fifty servers of large companies and checked every one. Not one held up as a vulnerability: 24 were false, 21 were tools doing what they exist for (run the SQL you give a SQL tool, read the file you name, fetch the URL you pass), and 6 stayed undecided.

That is the problem with raw scanner output on MCP code. Most tools take a string from a model and do something powerful with it, on purpose. A SQL tool that runs SQL is not a SQL injection. A scanner that cannot tell "the tool does what it says" from "the tool does more than it says" reports both, and a count of its raw output is a count of its noise. So we split them: a capability is what a tool says it does, and the public profile shows it as such; a vulnerability is the server doing more than it says, and it goes to the maintainer first.

The 6,265 are the slice we have checked so far, so 137 is a floor, not a rate. Findings were labelled in batches grouped by rule and code shape; every one marked real, and every report, was then traced on its own in the code at the scanned commit. Each report says what we did not verify. Nothing was installed or run.

3. What 4,133 servers look like

What their tools can do
What the code behind a tool reaches

Share of the 3,476 servers whose tools the scanner could follow: what the code behind a tool reaches, traced from the tool, not run. 63% reach at least one of the four.

None of this is a vulnerability by itself. All of it is what a prompt injection inherits. It is also not the same as "uses a risky API": a function somewhere in the code that reads files is not a tool that reads files.

The worst thing we publish about each server
The worst published item per server

Each server counted once, by the most severe item on its public profile: its own advisories, a declared risky tool, or a known vulnerability in a production dependency. Unverified code findings are not published and not in this chart, so "Nothing published" is not "clean". The tools of 657 servers could not be followed; 251 of them still have a published item, the other 406 are "Not analysed".

30% of all servers carry a critical item, and for 1,223 of those 1,244 it is a dependency: the lock file pins a version older than the fix of a critical advisory. That is a version match; whether the server calls the vulnerable function was not checked. Four advisories, in libraries nearly every Python and Node project uses, account for most of it.

Servers pinning four critical dependency advisories

Servers whose lock file pins a version older than the fix. 1,072 servers have at least one of the four. All four are rated critical in the GitHub Advisory Database and were published between September 18 and October 20, 2026.

The match applies when the server is run from its repository. A published package is different: pip ignores lock files inside a source distribution, and npm ignores a package's own package-lock.json. In 30 npm and PyPI packages we scanned, the lock files carried 15 critical and 98 high advisories that an install never gets; another 6 critical and 40 high do reach an install, all in one package that pins old versions itself. The fix: in a repository, update the lock file; in a published package, raise the dependency's minimum version and release a new version.

4. What the scanner catches, and what it misses

Cutting noise without losing real paths
On the first hundred servers the scanner reported 3,954 critical and high findings. We removed the causes of noise class by class, and the count fell to 3,062, while dataflow from MCP input stayed almost the same (192 to 179). Counting findings alone cannot tell noise from real paths, so we added the two measures below. Since then a rule may change only if it describes a class of code, never one project, and anything debatable goes to review instead of being deleted.

The same scan must give the same answer
The dataflow walk visited handlers in Go map order, which is random, so one server reported one high finding on some runs and two on others. Large projects hit a time budget, and whether they did depended on what else the machine was doing. The order is now fixed and budgets count CPU time, not wall time. Two full runs of a panel of 187 servers differ in 0 findings. Same machine, same answer.

Tested against vulnerabilities someone else found
We pinned 114 published advisories of MCP projects, 87 vulnerable versions, with the answer taken from each maintainer's fix commit, and every build runs against them. Findings on already-fixed code fell tenfold (303 to 27), and when one cleaned-up build lost real findings along with the noise, this set caught it before release. Every change since is checked against the known real findings it must not lose.

We also ran the v1.3.0 release on the open part of that set, which has grown since: 69 vulnerable versions from 94 published advisories. We study this part case by case to find classes of misses; every fix is still a general rule, checked on other data, and the sealed part is measured only as a total. In 23 it flags the vulnerable code or sends it to review. In the other 46 it does not. On 24 of those the profile still gives a reviewer a lead: the tool's dangerous capability (14) or findings of the same class nearby (10); how much time such a lead saves, we have not measured. On 7 the server is marked as not fully analysed, which says what was not read, not where the bug is. On the remaining 15 there is no signal yet. This is how we use the scanner ourselves: it tells a reviewer where to read, and 24 of the 137 confirmed vulnerabilities were found while reviewing the code around a finding, not by a rule.

What v1.3.0 does with known vulnerable versions

What the v1.3.0 release does with 69 known vulnerable versions (open part of the advisory set; each version counted once, by the strongest signal).

What v1.4 adds. v1.4 is in testing and not released yet. It turns some of the most frequent causes into rules: requests beyond fetch (headless-browser navigation, scraping and crawling libraries, Node's http and https, direct axios and got calls), handlers passed through a wrapper such as withTelemetry(...), and a committed build copy in dist/ read as the same code. It also follows handlers made by a helper (on one server, 4 of 30 tools traced before, all 30 now), reports option injection into git, rg, rsync, scp, sftp and pandoc as high, and reads pnpm and yarn lock files: on 29 servers that use them, 1,493 dependency advisories where v1.3.0 reported 215.

Turning what reviewers find into rules
Reading the code for our first reports, we kept meeting servers that listen without a login. We turned that into an analyzer for network and browser exposure, weighed against what the tools behind it can do, and shipped it in v1.3.0. The class it finds is now the largest of the 137: 54.

Every change also runs against a bench of 349 tiny MCP servers with locked answers: 129 of them are traps that look vulnerable and are not, and 56 were written separately and are sealed from the people who tune the scanner. The current v1.4 build passes 83% of the bench and 62% of the sealed cases.

5. Reported privately, fixed in public

Where the confirmed vulnerabilities stand

Where the 137 confirmed vulnerabilities stand on 2026-11-30, one per vulnerability.

Each report goes through a private channel: GitHub's private vulnerability reporting where it is on, the address in SECURITY.md, otherwise a short public issue that asks for a private contact and contains no details. Details stay private for 90 days or until a fix ships. The first reports went out on November 23. In the seven days since, we have reached the maintainers of 77 projects about 82 of the 137: 48 full reports, and 34 requests for a private channel, each followed by the report as soon as the channel opens. Of the 48 reports, 11 already have an outcome: seven are fixed, one is accepted as an advisory, and three were declined as out of scope (a sample, a prototype, a component that ships disabled). Six projects made the seven fixes, each within three days of our report, and all six credit the report in public. When we asked, five maintainers turned private reporting on.

48 reports delivered, 7 vulnerabilities fixed by 6 projects, all crediting the report

Fixed in public

  • mcp-discord. The case above: v1.5.3 the same day; the advisory, published the next day, GHSA-4c5x-38cw-mrcx lists us as the reporter.

  • drawio-mcp-server. The HTTP mode listened on every interface with CORS open to any web page, and an export could write to any path. v2.5.0, the day after our report, binds to 127.0.0.1, drops the wildcard CORS, adds DNS-rebinding protection and keeps exports in their folder; the advisory GHSA-jvqm-g5ch-jh76 lists us as the reporter. Our second report: the bridge to the browser extension accepted a WebSocket from any local page; v2.6.0 checks Origin and Host, and its release notes name our advisory. The project now runs mcp-scanner in its CI (044a27d).

  • mcs-mcp. A project key became part of a cache file name, so ../ could delete or overwrite files outside the cache. v0.22.1, the next day, validates the keys; the advisory GHSA-jwc6-74g5-g2vg lists us as the reporter.

  • eda-agent. SPICE .control blocks ran shell commands and wrote files. v0.8.2 checks them against an allow-list and keeps writes in the server's folder; its Security notes credit us by name.

  • org-mcp. Every file tool joined the caller's path to the notes folder unchecked. The maintainer turned on private reporting the day we asked, released v0.3.4 about two hours after our report, and published GHSA-p3p8-6cqq-h766 (high), which lists us as the reporter.

  • pyATS_MCP. It drives network devices with its testbed's credentials and listened on 0.0.0.0:8080 with no authentication by default. The fix (PR #22, the day after our report) binds to 127.0.0.1 and needs a token for any other address; the README names the report, and so do the release notes of NetClaw, another project of the same author.

We checked each fix at its release tag or commit.

The public profile of a server with an open report says only that notes were sent and when publication may happen: no count, no severity, no class. The badge points at a server, not at a bug.

6. What to do

If you maintain an MCP server

  • Listen on 127.0.0.1 by default. Any other address needs a token.

  • Check the Host and Origin headers on HTTP endpoints; in FastMCP 4.1 this protection stays off until you turn it on. Never send CORS * without a token.

  • Validate arguments in the handler. With the TypeScript SDK's low-level Server, inputSchema is not enforced: an enum there does not stop ../.

  • Start programs with an argument list, never a shell string. End options with -- before paths, and pass patterns with -e or the program's own form.

  • Resolve every path and check that it lies inside the allowed folder, by path components, not by string prefix.

  • Re-check the address after every redirect, and check a URL with the parser that will fetch it: Python's urlparse and a browser read a backslash before @ differently, so a domain check can approve a URL the browser opens elsewhere.

  • In a shared HTTP mode for a team, never let a client choose the upstream host.

  • Never send your key to a host the caller chose.

  • Add SECURITY.md and turn on private vulnerability reporting.

If you use MCP servers

  • Prefer stdio. Do not expose an HTTP mode's port beyond your machine.

  • Look up a server's profile before you install it.

  • Update servers regularly; if you run one from its repository, update its lock file too.

If you decide for a team

  • Keep a list of the MCP servers in use.

  • Make "no network mode without a token" a rule.

  • Check a server before it is allowed, the way you check a library.

To check your own server with the open scanner:

go install github.com/devlab-group/mcp-scanner/cmd/mcp-scanner@latest
mcp-scanner source ./your-server

7. The numbers you may have seen

Other studies answer other questions, and their numbers are not comparable with each other or with ours. What four of the most quoted ones count:

  • 43% command injection[1]: the share of "tested implementations" among some of the most popular servers; the number tested is not given, and the four shares in that list add up to 100%.

  • 82%[2]: the share of 2,614 MCP implementations that use file-system operations prone to path traversal. It counts API use, not bugs. In our data, 44% of servers have a tool whose code reaches files.

  • 7.2% and 5.5%[3]: 42 of 583 servers with at least ten stars had a vulnerability found by SonarQube; 5.5% showed tool poisoning: 4 of the 73 servers that mcp-scan could scan, from a random sample of 83.

  • 4.1%[4]: 93 of 2,287 candidate vulnerabilities, flagged by models and then reviewed, were exploitable. That study did not count a missing login as a vulnerability; for us it is the largest class.

Internet scans see the same problem from outside: 12,520 MCP services reachable from the internet[6], 492 servers with no client authentication[5]. Our largest class shows how a server gets there: a bind address and a missing check.

8. Method

Sample
4,133 open-source MCP server repositories, collected in batches over two weeks: the most popular, servers of large companies, small servers picked for language variety, then every project with a human commit in the last thirty days and at least five stars. It is not a random sample of the ecosystem. Plus 30 npm and PyPI packages, of which 8 could not be analysed (bundles over the size limit, proxies with no tools of their own).

Tool
mcp-scanner, open source. Servers on the v1.3.0 release, packages on a v1.4 preview build. Source mode only: nothing installed, built or run. 22,674 source scans over 76 builds.

Real, noise, doing its job
Our verdict on a finding after reading its code path: a real problem, a false positive, or a tool doing what it exists for.

Confirmed vulnerability
A real problem traced in the code at the scanned commit and recorded with its location, class and severity. Confirmed by reading, not by running an exploit. Includes the 11 that someone else had already reported and the 3 that a vendor declined as out of scope.

Design weakness
A risky design the project chose and documents, kept as advice, not counted among the 137.

Severity
Ours, one rule for every server, not CVSS. High: text a model reads, or an anonymous network caller, can cause code execution, an arbitrary write or delete, or use of the operator's credentials, in the default setup or in a mode the project offers its users. Lower when the mode is hard to reach or the tools behind it are weak. The dependency chart uses the advisory database's own rating.

Not analysed
The scanner could not follow the server's tools: an unsupported language, a bundle over the size limit, or no tools found. Never counted as clean; v1.4 follows more of them (section 4).

Beyond the source
Behaviour that depends on configuration, a remote backend or code loaded at run time, and hosted endpoints, is checked where the server runs, not in its source. Every potential code finding is read by a person before it reaches a public page.

Automated scanning gave us places to look. Confirming a vulnerability meant following the code, checking the intended behavior, and working out whether an attacker could cross a boundary the server was supposed to enforce. Some findings survived that review; many did not.

For a server used in production, that review also needs to cover its deployment: who can connect, which credentials its tools use, and what those credentials allow. A source scan provides part of that picture. The rest needs to be checked in the environment where the server will run.

The scanner and all 4,133 server profiles are public and free to use. Corrections are welcome at [email protected].

Dmitry Sergeev is the CEO of DevLab, which develops mcp-scanner and offers manual security audits of MCP servers.

Sources

  1. Equixly, "MCP Servers: The New Security Nightmare", March 2025. equixly.com

  2. Endor Labs, "Classic Vulnerabilities Meet AI Infrastructure: Why MCP Needs AppSec", January 2026. endorlabs.com

  3. M. M. Hasan et al. (Queen's University), "Model Context Protocol (MCP) at First Glance: Studying the Security and Maintainability of MCP Servers". arXiv:2506.13538

  4. Trend Micro, "Hunt Them All: An AI-Powered Vulnerability Sweep of 19,000 MCP Servers", May 2026. trendmicro.com

  5. Trend Micro, "MCP Security: Network-Exposed Servers Are Backdoors to Your Private Data", July 2025. trendmicro.com

  6. Censys, "MCP Servers on the Internet", data as of April 28, 2026. censys.com

  7. GitHub Advisory Database: GHSA-jqcg-44mw-7w3h (proxy-addr), GHSA-6q48-6c7w-9gw2 (certifi), GHSA-82r6-8w77-94w6 (anyio), GHSA-ffc3-869f-jxw9 (pyjwt), via osv.dev.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.