> status: mostly fine. patch anyway.practical AI security · est. 2026

Brief · Builders

How to Secure an MCP Server

By alkizz ·

Update, Nov 26, 2026: One more AWS Labs server, and a different package from the two in the Nov 17 update below. AWS's bulletin 2026-200-AWS on Nov 24 covers CVE-2026-135614 in the Amazon ECS MCP Server (awslabs.ecs-mcp-server) before 0.1.36. With the sensitive-data setting left at its default, the server's troubleshooting tool returned container environment variable values and secret references from ECS task definitions without the redaction that setting is meant to apply, so content an attacker can get in front of the agent could use prompt injection to pull those values out. The GitHub advisory rates it Moderate and notes that the tool is read-only, the server uses a local stdio transport by default, and it only reaches task definitions your AWS credentials can describe. The fix is in 0.1.36, which PyPI shows went up on Sep 22, and 0.1.39 is current. There's no workaround, and AWS says to rotate any credentials stored as plaintext task-definition environment variables. It's the read-only lesson from the other side: a redaction setting is also a promise from the tool's author, and the durable fix is not keeping credentials in plaintext environment variables at all (item 1). The Timestream (0.0.19) and Pricing (1.0.31) fixes in the Nov 17 update still stand.

Update, Nov 25, 2026: Another late-indexed advisory makes the default-compose lesson concrete. GitHub's reviewed advisory database listed CVE-2026-59726 (CVSS 10.0, Critical) on Nov 24 for ruflo, an agent meta-harness for Claude Code and Codex, though the repository advisory itself came out July 1. Before version 3.16.3, ruflo's default docker-compose.yml bound both the MCP bridge and MongoDB to all network interfaces and left POST /mcp unauthenticated, letting any reachable caller invoke terminal_execute to get a shell in the container, read every provider API key (OPENAI, GOOGLE, OPENROUTER, ANTHROPIC) from its environment, and write poisoned patterns into the AgentDB learning store—while the tool blocklist only applied in the autopilot flow. If you deployed ruflo from an older compose file on a reachable host, upgrade to 3.16.3 (which binds loopback by default and adds bearer auth and a server-side terminal_execute gate), firewall ports 3001 and 27017 (item 18), rotate those provider keys (item 1), and audit and purge AgentDB patterns and MongoDB (item 23), because redeploying the container does not undo memory poisoning.

Update, Nov 23, 2026: The MCP project's reference servers got eight security fixes on Nov 18 in v2.5.0, and six of them are in mcp-server-git. Five of those six share one idea: the repository the server was pointed at could make it run commands. A git_merge kicked off Git's automatic maintenance, which runs whatever a repo's own gc.recentObjectsHook names. A read-only tool could start the program a repo's config names for fetching missing objects (core.sshCommand, uploadpack). Filter and merge drivers could slip in through config included from a file a merge or checkout had just written, or hide behind an empty name, and a submodule's own diff drivers ran too. Separately, a crafted .git/index let git_diff read files outside --repository. Upgrade mcp-server-git to 2026.11.18, and note the release says the --repository check isn't yet repeated after a tool writes the working tree (#5599). The other two fixes are a symlink-swap race in server-filesystem directory listings (fixed on Linux and macOS, not yet on Windows) and a NAT64 bypass of the private-address guard in server-everything, fixed in 2.3.1. If your agent reviews repos it didn't write, treat the cloned repo as untrusted input to its git tool, same as the AGENTS.md files in item 19 of the Builder's Checklist.

The filesystem fix comes with a trap. The TypeScript servers moved from date versions (2025.x, 2026.x) to normal version numbers, and package managers rank 2.4.0 below every date version, so npm update won't offer it. Date versions 2025.1.14 through 2026.8.31 are affected. Install it by name, npm install @modelcontextprotocol/server-filesystem@2.4.0, and pin that exact version (item 12 and item 22).

Obot, an MCP gateway, shows why the first step below says not to accept a caller-supplied identity. Its GHSA-cp2w-pc8v-r54p (Critical, 9.6) covers versions 0.21.1 through 0.28.1 with authentication on. To let logged-out callers reach the login prompt, the gateway waved through anyone whose username was anonymous, and users could change their own username. A signed-in user who renamed themselves anonymous skipped ownership checks, access rules, virtual-server profiles and API key scopes, and could call tools on any MCP server whose ID they knew, with that server's stored config, such as admin-set headers, applied. Servers that use per-user OAuth weren't exposed, and neither was the REST API. Version 0.28.2, released Nov 19, fixes it, and usernames now come only from the identity provider or SCIM. The same release says it fixes several other vulnerabilities in authorization and MCP OAuth, so upgrade even if your users can't rename themselves. The lesson I'd take for any gateway you build or buy: never authorize on a name the user can edit. Decide on how someone authenticated, not what they're called, the same way item 17 treats a name-based allowlist as a label, not a lock.

Update, Nov 19, 2026: Four advisories published to NVD on Nov 18 make the same point: a local MCP server isn't private just because it listens on your own machine. Todoist's official todoist-mcp-http server didn't check the Host or Origin headers, so a malicious website could use DNS rebinding to reach it on loopback and run its tools with the server's Todoist API key (CVE-2026-76807, rated Critical). The fix, 10.3.3, has been on npm since June 24, and the advisory came out July 10. obsidian-sync-mcp before 0.5.7 had the same gap when run without MCP_AUTH_TOKEN (CVE-2026-77283), and setting the token blocks it because browsers don't attach it. Supergateway 2.4.0 through 4.2.2 doesn't check the Origin header in its stdio-to-WebSocket mode, so a web page can open a session even against a gateway bound to localhost (CVE-2026-132121), and as of Nov 19 the latest release is 4.2.2, so avoid that mode for now, or start it with --apiKey: the WebSocket handshake then needs an Authorization or X-API-Key header, and a web page can't add one. And k8s-mcp-server before 1.1.0 listened on 0.0.0.0:8080 with no authentication and write-capable Kubernetes tools on by default (CVE-2026-130007). Version 1.1.0, out since Aug 31, requires bearer authentication, checks browser origins and defaults to stdio. Add Jupyter MCP Server to the list: before 1.0.3, its standalone HTTP mode checked the token and the Host and Origin headers on /mcp but not on the /api/connect and /api/stop management routes, so a web page using DNS rebinding, or any network caller, could point it at an attacker's Jupyter backend and stop the current kernel (CVE-2026-77359 and CVE-2026-77318), and the fix, 1.0.3, has been on PyPI since July 11.

The MCP specification already says HTTP servers must validate the Origin header to prevent DNS rebinding, should bind only to localhost when running locally, and should authenticate every connection. So prefer stdio for local tools, and if you need HTTP, require a token even on localhost.

Update, Nov 17, 2026: AWS published two Moderate advisories for its open-source AWS Labs MCP servers on Nov 16, and both start with content the agent reads. In the Timestream for InfluxDB MCP Server, versions from 0.0.12 up to, but not including, 0.0.19 didn't restrict which endpoints the server connected to, so prompt injection could slip in a crafted InfluxDB URL and the server would send its configured InfluxDB API token there. In the AWS Pricing MCP Server, the cost report tool before 1.0.31 could be steered into writing files outside its output directory, and because the tool was labeled read-only, clients set to auto-approve read-only tools could run it without asking. AWS fixed them in awslabs.timestream-for-influxdb-mcp-server 0.0.19 and awslabs.aws-pricing-mcp-server 1.0.31, and says anyone who used an affected InfluxDB server version should rotate the InfluxDB API tokens configured for it. The deprecated awslabs.cost-analysis-mcp-server (1.0.5 and earlier) has the same file-write bug and won't get a fix, so AWS says to move to the pricing server. Neither works unless the agent reads content an attacker can influence, and I'd add one lesson to the list below: a read-only label is a promise from the tool's author, not a control.

An MCP server can turn a line of text into a command, a database query or a request made with your credentials. I start with what it can reach and who can make it act, not whether the model promises to behave. A polite model attached to an unauthenticated command launcher is still an unauthenticated command launcher.

The client matters too. A server can supply tool descriptions, return URLs and influence an OAuth handshake, so securing the server you operate doesn't make every server your client connects to trustworthy.

The breaks worth learning from

The nine-server MCP vulnerability batch included command-injection flaws where tool parameters were pasted into shell commands. In Langflow's MCP settings flaw, adding a server could run a command, and auto-login made the supposed login boundary a poor consolation.

The direction can reverse. The opencode and MCP Inspector OAuth bugs let a remote server's authorization URL reach a shell on Windows or WSL. Inspector's later import fixes addressed another version of the same problem: a friendly package name hiding the command that would actually run. AgentScope's 2.0.11 control API supplied another example, accepting a caller-chosen stdio command without a real authentication boundary, as described in the AgentScope brief.

These aren't reasons to abandon MCP. They're reasons to stop treating configuration as harmless text.

What to do

What these releases do and don't fix

Component and release What changed What still needs attention
Langflow 1.13.0 Auto-login defaults to off. An explicit LANGFLOW_AUTO_LOGIN=true overrides it. Disabling auto-login doesn't revoke existing sessions or API keys.
MCP Inspector 2.14.0 Import checks reject unsafe package tokens and environment names, the UI shows the resolved command, and fixes address frame navigation and schema-pattern resource exhaustion. Runtime arguments still need human review; the import flow is not a full runtime-flag allowlist.
AgentScope 2.0.11 The control API accepts caller-chosen stdio commands without proper authentication. This is not a fixed release. Don't expose that management API while waiting for a vendor fix. An opt-in proposal is not protection in an installed release.

Those are specific release snapshots, not a promise that these versions solve every future advisory. For Langflow, use the upgrade and account-recovery guidance, set a password before changing an auto-login installation, and remove settings that turn auto-login back on. For Inspector, 2.14.0 includes the later fixes; stopping at the older OAuth fix leaves other problems behind.

I want an MCP integration to have a small, explainable job. If its job requires a shell, broad credentials and permission to install whatever the model remembers, the next useful feature is a smaller job.

Sources

← All briefs