One unauthenticated request reached a shell in the fast-agent advisory published this month. The fix changed where the server listens. It did not add a login, so the check has to be yours.
You start a tool server on your laptop, test it from a second terminal, and it works. What you may not have noticed is that it also works from the next desk, the next virtual machine, and any other host that can route to your port. No password failed. No permission was bypassed. There was simply no one at the door to ask for either.
That is the cost of a simple default in production. The demo takes ten minutes because the server skips identity entirely. The incident takes one request because an attacker does not skip anything.
The two status quo options are both bad. Bind the server to every interface and trust the network, which is how the case below worked. Or bind it to localhost and call that security, which fails the first time the server moves into a container, a shared development box, or a deployment script that sets the host to 0.0.0.0 for you. The gap this piece fills is the third option: a small gate, in code, outside the agent, that checks the caller on every request and refuses to start in the configuration that caused the advisory.
Start With the Advisory, Not the Theory
On November 6, 2026, the National Vulnerability Database published CVE-2026-102610 for fast-agent, an open source Python framework for building and serving agents over the Model Context Protocol. The GitHub advisory, GHSA-9vhv-g5hf-m7m7, followed on November 9.
The facts are plain. In fast-agent-mcp 0.7.20 and earlier, the serve command used HTTP transport bound to 0.0.0.0 on port 8000, with no authentication and no warning at startup. Any network client that could reach the endpoint could invoke the exposed agent tool. Started with the shell flag, which the advisory notes was the flag in the README quickstart, the agent could also call a local tool that runs operating system commands. One plain language message from a client with no credentials was enough to ask for a command to run.
The fix shipped earlier than the advisory. Version 0.7.21, released June 19, 2026, moved the default bind to 127.0.0.1 and added warnings for remote binds. Read that sentence again and notice what it does not say. It did not add token authentication.
A lab write-up published November 11, 2026 makes the limit concrete. AgentOpsGuide tested the fix against 0.7.21 and the then current 0.10.54 in an isolated network. Both bound to loopback by default. An unauthenticated client on the same machine still ran a shell command. Adding the host flag for 0.0.0.0 restored full remote access, with a printed warning as the only new barrier. The lab also reported that every version it tested answered an initialize request carrying a foreign Host and Origin header with HTTP 200.
This is also the conversation at the top of dev.to this week. The most discussed post, MCP Is Dead Simple. And That Is Exactly the Problem, published November 12, names safety and idempotency as the production gaps that the simple demo leaves out. Safety starts earlier than most teams place it. It starts with who is allowed to call the server at all.
A warning printed at startup is not a check performed at request time.
Separate the Three Things the Default Merged
The vulnerable default merged three separate decisions into one silent assumption, and each one needs its own control.
First, the bind address decides who can reach the port. It decides nothing about who should be allowed to use it. A loopback bind helps on a single user laptop. It helps much less in a container, where port publishing moves the endpoint, or on a shared host, where every other local process and user is already inside the boundary you thought you drew.
Second, authentication decides who the caller is. In the affected versions this was set to none unless an operator configured an external option on purpose. No token, no signature, no session. The server did not reject anonymous callers because rejecting them was never implemented as the default path.
Third, the permission prompt decides whether a specific tool call may proceed. Here is the detail worth carrying into every review you do next. The advisory notes that the server side permission prompt did not block the access in non-interactive serve mode. A prompt is a control only when a human is present to answer it. Serve mode, by definition, runs with nobody watching. A control that requires a person, deployed in a mode with no person, is not a weakened control. It is an absent one, wearing the name of a present one.
Once you see those three as separate, the fix stops being upgrade and hope. Upgrade, yes, and then put an explicit check in each place.
caller gate (your code) MCP server
| | |
|--- request ----------->| |
| token valid? ---- no ----> DENY, log it
| Host / Origin sane? - no -> DENY, log it
| scope covers tool? -- no -> DENY, log it
| |--- allowed call ---------->|
| |<-- result -----------------|
|<-- result -------------| |
startup: non-loopback bind + no token configured = refuse to start
The gate sits in front of the server, not inside the agent. The agent never decides whether its own caller was legitimate, for the same reason a model should never be the only judge of its own tool call. The decision is deterministic, testable, and logged by code that an instruction in a prompt cannot rewrite.
Put the Check in Code Before the Tool Runs
Here is a complete gate model in plain Python, standard library only. It is deliberately small. It models the server boundary, so you can run it, read the counted results, and then place the same three checks in the middleware or proxy your real server already has.
#!/usr/bin/env python3
"""serve_gate.py - a small gate in front of an MCP serve endpoint.
Stdlib only. Run: python3 serve_gate.py
"""
# Config for the gated server. In real use the token comes from the
# environment, never from code, and each caller gets its own token.
TOKENS = {
"reader-token-aaa": {"caller": "review-bot", "scopes": {"read"}},
"ops-token-bbb": {"caller": "ops-agent", "scopes": {"read", "shell"}},
}
ALLOWED_HOSTS = {"127.0.0.1:8000", "localhost:8000"}
TOOLS = {
"get_employee_record": "read",
"file_complaint": "read",
"execute": "shell",
}
def check_startup(bind_host, token_configured):
"""Return (ok, reason). A remote bind with no auth must not start."""
loopback = bind_host in ("127.0.0.1", "localhost")
if not loopback and not token_configured:
return False, "refuse to start: non-loopback bind with no token"
if not loopback:
return True, "start with warning: non-loopback bind, token required"
return True, "start: loopback bind"
def naive_handle(req):
"""The 0.7.20 model: no auth, and the permission prompt has nobody
to ask in serve mode, so it does not block."""
return "ALLOW"
def gated_handle(req):
"""Return (decision, reason). Every check is code, outside the agent."""
token = req.get("token")
entry = TOKENS.get(token) if token else None
if entry is None:
return "DENY", "no valid token"
if req.get("host") not in ALLOWED_HOSTS:
return "DENY", "unexpected Host header"
origin = req.get("origin")
if origin and not origin.startswith("http://127.0.0.1"):
if not origin.startswith("http://localhost"):
return "DENY", "foreign Origin header"
need = TOOLS.get(req.get("tool"), "read")
if need not in entry["scopes"]:
return "DENY", f"caller {entry['caller']} lacks scope {need}"
return "ALLOW", f"caller {entry['caller']}"
A few things are worth noting about this example. First, the startup check runs before any request exists. A non-loopback bind with no token configured is a refusal, not a warning, because the November lab showed what a warning alone is worth once a script sets the host flag. Second, the token maps to a named caller with named scopes. When a call is denied or allowed, the log line can say who asked, which is the difference between an audit trail and a pile of anonymous requests. Third, the shell tool needs its own scope. A caller approved to read records is not thereby approved to run commands, and the gate enforces that per tool, per request.
Run it against an eight case matrix, from no token at all to a valid token with a foreign Origin header, and the counted output is this:
naive: 8/8 allowed
gated: 2 allowed / 6 denied of 8
startup: 1 of 3 refused
The naive model allowed all eight, including a shell call from a remote host with no token. The gated model allowed exactly the two calls that should pass: a reader reading, and an operations caller with shell scope calling from an expected host. The other six failed with a named reason each. That specificity matters when you operate this. A deny that says which check failed is a debugging tool. A deny that says nothing is a ticket queue.
Find the Servers You Already Started
Do not start by rewriting anything. Start by looking. On any host where you or your team run agent servers, check what is listening and then test it the way an anonymous caller would.
ss -tlnp | grep 8000
python3 -m pip show fast-agent-mcp
curl -s -i -X POST http://127.0.0.1:8000/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}'
Read the results plainly. If the first command shows a bind on 0.0.0.0, the server is reachable beyond the local machine. If the version is 0.7.20 or earlier, upgrade before you do anything else:
python3 -m pip install -U "fast-agent-mcp>=0.7.21"
If the curl test returns HTTP 200 with no Authorization header sent, your server accepts anonymous callers in its current configuration, whatever the bind address says. That single test, run in CI against every served agent you ship, would have caught the advisory configuration on the first day. Add it as a test that must fail the build, not as a note in a runbook. Runbooks are read after incidents. Tests run before them.
Apply the same three questions to any MCP server you serve, not only this framework. What does it bind to by default. What authentication runs if you configure nothing. What happens to its approval step when no human is in the loop. If any answer is a shrug, you have found your work for the afternoon.
Where This Breaks
- A shared token is a shared identity. If five callers hold the same token, revoking one caller means rotating the token for all five, and your logs still cannot say which caller acted. Issue one token per caller from the start.
- Loopback is not a boundary in containers or on shared hosts. Port publishing, sidecars, and other local processes all sit inside it. The token check is the control. The bind is a courtesy.
- This gate checks the caller, not the content. A legitimate caller with shell scope can still be talked into a bad command by a poisoned document or a manipulated tool result. Scope checks sit alongside tool level policy, not in place of it.
- Host and Origin checks stop casual cross origin abuse. They stop nothing once an attacker can set headers freely from a non-browser client. Treat them as a cheap filter, never as the authentication.
- Tokens sent over plain HTTP on a shared network can be read and replayed. Serve over TLS, or keep the endpoint on a private network segment, and rotate tokens on a schedule you actually keep.
Build It If, Skip It If
Build it if your agent is served over HTTP, runs with a shell or write tool, lives on a shared host or in a container, or runs unattended. That last condition covers most production agents, which is the point. Unattended is serve mode, and serve mode is where prompts go to be ignored.
Skip it if your server runs over stdio on your own machine, started by your own client, with no network listener at all. There is no remote caller to authenticate. Spend the afternoon on tool scoping instead, which is the risk that setup actually carries.
The minimal viable version fits in an afternoon. Refuse a non-loopback start with no token. Check one token per caller in middleware. Give the shell tool its own scope. Add the anonymous curl test to CI. Four changes, none of them a platform purchase, and the advisory configuration can no longer start, let alone serve.
Pick one served agent you own this week, run the anonymous request against it, and write down what it answered. Then add the gate and run it again. Decide from those two outputs, not from the version number in your lockfile, whether you were ever actually closed.
When you tested a served agent with no credentials, what did it let you do?
Top comments (2)
The foreign Host and Origin result is the line I'd underline for anyone who thinks the 127.0.0.1 default fixed it. A web page open in your own browser can reach localhost through DNS rebinding, so a localhost-only server still has to reject unexpected Host and Origin headers, on top of the caller check you describe.
A warning at startup is no check at request time.