Part 2 of 2: the conclusion of a series on AI agent trust boundaries

You Didn't Have to Escape Anything

Part 1's sandbox confined the filesystem and nothing else. The network path to this was open before anyone broke a single thing. Then it was fixed, and the fix is the second half of the story.

CVE-2026-54504 is a missing-authentication bug in @andrea9293/mcp-documentation-server, a real, currently-published npm package that gives AI coding agents a local document store with semantic search. Every version from 1.13.0 up to, but not including, the 1.13.1 patch ships a web API with zero authentication, bound to every network interface, on by default. Part 1 closed on a thesis: sandbox failures come down to an attacker-controllable input, a dangerous capability, and unchecked ambient authority, not weak containment technology. This piece tests that thesis against software Part 1 never touched, and unlike Part 1, nothing here needed a stand-in. I installed the real vulnerable version from the public registry and reproduced the bug directly against it. The second half then reads the patch that closed it, sets it next to the fix from Part 1, and ends the series.

You Didn't Have to Escape Anything: a diagram showing an MCP documentation-server web UI binding every interface on 0.0.0.0:3080 with zero auth checks in its route table, next to an agent's knowledge base open to unauthenticated read, enumerate, write, and delete (CWE-306). CVE-2026-54504.

What mcp-documentation-server actually is

@andrea9293/mcp-documentation-server is a TypeScript MCP (Model Context Protocol) server: a local document-management and semantic-search tool that AI coding agents connect to over MCP so they can store, search, and retrieve project documentation with embeddings. It's a real, actively maintained package, published by a single maintainer (andrea9293), currently at version 1.15.3 on npm with a clean release history back through 1.0.0. Alongside its MCP interface it ships an optional web UI: a small Express server meant to let a human browse and manage the same document store from a browser.

That web UI is the whole story. It starts automatically, binds to every network interface by default, and checks nothing before answering a request.

No escape required

Part 1's sandbox policy, quoted directly from that piece: "writes outside the workspace are denied, and everything else (process execution, file reads, loopback networking) is allowed by default." That sandbox, like every sandbox in Part 1's comparison table, only ever confined the filesystem. Network access to other local services was never restricted, escaped or not.

That matters here specifically because this bug doesn't require an agent, a sandbox, an escalation, or an escape at all. Anyone who can reach the port can read, write, and delete an AI agent's knowledge base directly. No prompt injection needed to get an agent to do it on your behalf; you can just do it yourself. The "escalation" step that took up most of Part 1 doesn't exist in this story because there was never a gate to get past in the first place.

HOST MACHINE mcp-documentation-server web-server.js app.listen(PORT) no host argument given CWE-306 0 auth checks in the route table document store what the agent actually knows and retrieves from anyone on the same LAN, VPN, container bridge, or routed network path GET / POST / DELETE no token, no header, nothing required
Fig. 1: no sandbox, no agent, and no escalation anywhere in this diagram. The route table itself is the entire attack surface.

A reproduction I actually ran, against the real thing

Scope, stated plainly: this is the genuine, currently-published vulnerable version, installed from the public npm registry on this machine, not a stand-in. Every screenshot below is an unedited, full-screen capture of real execution against real, unmodified code. One deliberate substitution: the server's own auto-generated document ID (an arbitrary hex string) is swapped for the literal placeholder <doc-id> by the capture script before the terminal is screenshotted, purely so a meaningless local identifier isn't published verbatim. Every HTTP call shown, including the delete in Screenshot 6, is still made with the real ID the server actually returned.

Installing the exact vulnerable version, from the real registry:

Terminal screenshot: npm install of @andrea9293/mcp-documentation-server version 1.13.0 completing successfully, with the installed package.json confirming the exact name and version.
Screenshot 1: 322 packages, real registry, confirmed name and version. npm's own audit also flagged 7 high-severity vulnerabilities in the dependency tree, a separate issue from the one this piece is about.

The real, shipped, compiled code, not a paraphrase of it:

Terminal screenshot: grep output from the real installed package showing the START_WEB_UI default-on check, the app.listen call with no host argument, every registered API route, and a search for any auth or middleware check that finds nothing but a comment labeled Middleware with no authentication behind it.
Screenshot 2: fourteen routes, zero authentication. The only hit for "middleware" in the whole file is a comment; what's actually under it is body-parsing and static file serving, nothing that checks who's asking. The GHSA advisory names six of those fourteen by path; the other eight, including four separate unauthenticated upload endpoints, aren't called out there.

Starting it with nothing but the defaults:

Terminal screenshot: the real server's own startup banner, printing Local http://localhost:3080 and Network http://0.0.0.0:3080, disclosing its own exposure to every network interface.
Screenshot 3: the server announces its own exposure in its own startup banner. Nobody had to find this; it prints it.

No login, no token, no header, just asking:

Terminal screenshot: GET requests to /api/config and /api/documents both returning HTTP 200 with real data and no authentication of any kind.
Screenshot 4: two unauthenticated reads, two 200s.

Writing into the knowledge base the same way:

Terminal screenshot: an unauthenticated POST to /api/documents returning HTTP 200 with a new document ID and success message, followed by a confirming GET that shows the planted document now present with a real timestamp.
Screenshot 5: a document with attacker-chosen content, now sitting in the agent's real knowledge base, timestamped and confirmed by a second unauthenticated call.

And deleting it, closing the loop on full unauthenticated CRUD:

Terminal screenshot: an unauthenticated DELETE request succeeding with HTTP 200, followed by a confirming GET showing the document store back to empty.
Screenshot 6: read, write, and delete, all with zero authentication, all against the real, unmodified, currently-published package.

The paperwork

Table 1: vulnerability summary.

FieldValue
CVECVE-2026-54504
CWECWE-306 (Missing Authentication for Critical Function), CWE-668 (Exposure of Resource to Wrong Sphere)
CVSS 3.18.8 High, vector AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H per the CNA advisory.
Affected>= 1.13.0, < 1.13.1
Fixed in1.13.1
Scope confirmedRead, enumerate, write, and delete documents, confirmed live against the real package for this piece. The advisory explicitly states this does not provide remote code execution; I didn't attempt to find any, and nothing here should be read as a claim that one exists.
EPSS / KEVEPSS 0.57% (45.2nd percentile) at last check. Not in CISA's Known Exploited Vulnerabilities list.
The CVSS vector's AV:A means adjacent-network-only, but the same advisory's own description frames the service as reachable from "LAN, VM network, container bridge, VPN, or another routed network," which reads broader than strictly adjacent. Check the GHSA advisory's own vector before citing this elsewhere.

Table 2: disclosure timeline.

Date (2026)Event
Jun 4GHSA-6f5r-5672-72j7 published on GitHub, about three months before the CVE/OSV publish date below; which date better reflects the actual disclosure isn't clear from either page
Sep 17CVE-2026-54504 published
Sep 30Advisory last modified (status shown as "Deferred" on the aggregator I checked; not explained there)
Jun 41.13.1 published to npm, the same day as the GHSA, per the registry's own publish time. It changes the Web UI's default bind address. It does not change the default-on behavior; see the patch below
Checked directly against the primary source for this revision: the GitHub security advisory (GHSA-6f5r-5672-72j7) credits GitHub user mcfly-zzh as reporter, and fix commit plus PR #20 on the andrea9293/mcp-documentation-server repository back the 1.13.1 release above. The GHSA and OSV also agree on CWE-306 and CWE-668 and on the CVSS 3.1 vector in Table 1. The three-month gap between the GHSA's own publish date and the CVE/OSV publish date is flagged above rather than resolved; what the registry does settle is that the gap sits between the fix and the CVE record, not between disclosure and fix.

It's not a documentation-server problem

The same shape, trust whatever's local, shows up across the Model Context Protocol ecosystem in 2026, not just in one small package from one maintainer:

MCP SDKs: the bug lives one layer below the server

Three official language SDKs used to build MCP servers shipped the same class of flaw, meaning any server built on top of them inherited it by default:

Go SDK (CVE-2026-34742): DNS-rebinding protection was off by default for HTTP-based servers using StreamableHTTPHandler or SSEHandler. A malicious website could use DNS rebinding to get a victim's browser to bypass same-origin restrictions and reach a local MCP server directly. Fixed in 1.4.0, where the protection is now on by default when binding to localhost; stdio-transport servers were never affected. CVSS 3.1 8.1, CWE-1188 (Initialization of a Resource with an Insecure Default). A separate, later, non-CVE fix in the same codebase corrected a case-sensitivity bug where IsLoopback compared hostnames against literal lowercase "localhost," meaning a request claiming Host: LocalHost was rejected even legitimately; that fix is not confirmed to be in the same 1.4.0 release.

Java SDK (CVE-2026-35568) and Ruby SDK (CVE-2026-63118): the same underlying pattern, missing or insufficient Host/Origin header validation on HTTP transport, letting a browser steered by DNS rebinding reach a locally-bound MCP server. Severity reporting on the Ruby SDK finding is inconsistent across sources I checked, one lists CVSS v4 6.9, another's own title calls it critical, so don't treat either number as settled without checking the advisory directly.

Real products built on top

Jan (CVE-2026-66005): a popular local AI app's API server dropped its trusted-hosts allowlist entirely when bound for LAN access, via a wildcard that matched every Host header including attacker-controlled ones, making DNS rebinding straightforward against its MCP tool-invocation surface.

Apollo MCP Server (CVE-2026-35577): versions before 1.7.0 skipped Host header validation on StreamableHTTP transport, the same DNS-rebinding exposure, fixed by enabling that validation by default.

CircleCI's MCP server: three advisories from the same research, Pluto Security's "Vicious Circle." The maximum-severity one, CVSS 10.0, is unauthenticated command injection through a crafted filename, reaching the operator's own CI pipeline and credentials, not the header issue below. A separate, lower-severity flaw, CVSS 8.3, is the Host/Origin gap: the server's allowlist never checked either header, so a malicious website a developer merely visits can reach the local server through DNS rebinding and drive it with the operator's own API token.

9router (GHSA-4922-8r65-fq26): an isLocalRequest() gate that, like the pattern throughout this list, trusted the client-supplied Host header instead of the actual socket peer address. Chained with a default password and unvalidated MCP plugin arguments, that combination reached remote code execution. The advisory's own suggested fix: check the socket address, not the header.

Atlassian's MCP server ecosystem has at least two more 2026 findings in the same broad family (unauthenticated access and token-handling issues, including one reported at CVSS 10.0), which I'm naming here without the same level of verified detail as the findings above; treat those as a pointer to check directly rather than as verified claims in this piece.

Three ordinary ingredients, tested

Part 1's thesis: an attacker-controllable input, a dangerous capability, and unchecked ambient authority, combined, is what turns a design shortcut into a critical vulnerability, not weak sandboxing technology specifically. Here, the same three ingredients show up in their most extreme form: attacker-controllable input needs no prompt injection at all, just network reach; the dangerous capability is full read/write/delete control of an agent's actual knowledge; and the unchecked ambient authority isn't a broken check like Part 1's Host-header trust, it's the complete absence of any check, the honor system with nothing in it at all.

That's the real finding here: Part 1 had a lock, picked badly. This has no lock. If the thesis is that unchecked ambient authority is the recurring failure mode rather than any one vendor's mistake, finding it in its purest form on the very next real target tested is a stronger confirmation than finding another broken-lock variant would have been.

And the connective thread back to Part 1, worth stating plainly since it's easy to miss: this isn't "a sandbox escape led here." Part 1's own sandbox policy allowed loopback and local networking by default, the same way every sandbox in that piece's comparison table did. An agent never had to escape anything to reach this server; the network path was open the entire time, sandboxed or not. What actually connects the two pieces isn't a causal chain, it's the same question asked twice: not whether a sandbox holds, but what, inside or outside of one, will trust something it was never supposed to.

Then it was fixed

Everything above is the bug. The rest of this piece is the patch, because a fix is the one place a project writes down what it thinks the boundary is.

Scope for this half, stated plainly: I downloaded the published tarballs of versions 1.13.0, 1.13.1, and 1.15.3 of the package from the public npm registry and compared their compiled dist/web-server.js and dist/server.js files. That's a static read of shipped code. I did not run the patched versions, I did not probe them, and nothing below is a claim that a new vulnerability exists in any current release. Where I'm describing what the code does, it's from the source; where I'm drawing a conclusion from that, I say so. The Part 1 fix is described only from the public record quoted in Part 1, since that codebase was never available to me.

The fix, in full

The entire security-relevant change between 1.13.0 and 1.13.1 is in one file. This is the real diff, trimmed only of the cosmetic banner lines around it:

 export async function startWebServer(portArg, sharedManager) {
     const PORT = parseInt(String(portArg || process.env.WEB_PORT || '3080'));
+    const HOST = process.env.WEB_HOST || '127.0.0.1';
 ...
-    // Start server
-    const server = app.listen(PORT, () => {
+    // Start server (bind to HOST, default 127.0.0.1 for security)
+    const server = app.listen(PORT, HOST, () => {
 ...
+        if (HOST === '127.0.0.1') {
+            console.log(`  ℹ️  Set WEB_HOST=0.0.0.0 to expose on all interfaces`);
+        }

The patch: a host argument where there wasn't one, a loopback default, and an opt-in environment variable for the old behavior.

That is a correct fix for the bug as the CVE describes it. The one-line vulnerability class named above was app.listen(PORT) with no host argument; the patch supplies the argument. A device elsewhere on the LAN, VPN, or container bridge can no longer reach the port by default, and the advisory's adjacent-network vector no longer applies to a default install.

It's also worth being exact about what the patch does not touch, because that's the part this piece is about:

  1. The route table is unchanged. The same routes are registered in 1.13.1 and in 1.15.3, with the same handlers. Between 1.13.1 and 1.15.3 the only change to this file is the startup banner moving from console.log to console.error.
  2. No identity check was added. The middleware section is still body parsing and static file serving. The fix changes where the server listens, not who it listens to.
  3. The web UI is still on by default. The check in server.js is still process.env.START_WEB_UI !== 'false' in all three versions I read, and the current README still documents the default as true.
BEFORE · 1.13.0 AFTER · 1.13.1 AND LATER anyone on the network LAN, VPN, container bridge reaches every route HOST MACHINE web UI + API app.listen(PORT) binds 0.0.0.0:3080 no credential asked document store read, write, delete anyone on the network LAN, VPN, container bridge closed by the fix HOST MACHINE web UI + API listen(PORT, HOST) 127.0.0.1:3080 same routes, unchanged any local process browser, agent, dev tools still no credential asked document store read, write, delete
Fig. 2: what the patch moved and what it left. The network path is gone. The trust rule inside the machine is the same one as before: being able to connect is the whole credential.

The registry also settles something the advisory pages didn't: 1.13.1 was published on June 4, 2026, the same day as the GHSA, with 1.13.2 eleven minutes later and 1.14.0 about two hours after that. The fix was fast.

Two fixes, two different ideas of the boundary

Set that next to the fix from Part 1. DeepSeek Harness had a control API that trusted a client-supplied Host header. Its fix, per the public record, replaced that check with a one-time token printed at startup, exchanged for a signed cookie that every later call must carry. Part 1 summarized it this way: the fix "stops asking a request what it claims to be and starts asking it to prove it was present when the process started."

Table 3: the two fixes compared.

Part 1: DeepSeek HarnessThis piece: mcp-documentation-server
What failedA check that trusted the wrong input (CWE-807)No check at all (CWE-306), on every interface (CWE-668)
Fix shapeProof of presence: startup token, signed cookie on every callNarrower reach: bind to 127.0.0.1 unless WEB_HOST says otherwise
Ingredient removedUnchecked ambient authorityNetwork-wide reachability of the input
Who is trusted after the fixWhoever holds the tokenWhatever can open a connection on the local machine
Where the boundary now sitsAt the requestAt the network interface

One fix added a lock. The other moved the door indoors. Both close the reported bug, and I'm not arguing the second one is wrong: for a single-maintainer tool whose stated threat was exposure to the local network, binding to loopback is the proportionate, standard remedy, and it shipped the same day as the advisory.

But the series thesis makes a specific prediction about which of those two shapes ages better. The thesis was that these failures come from three ordinary ingredients together: an attacker-controllable input, a dangerous capability, and unchecked ambient authority. The Part 1 fix removes the third ingredient outright. The fix here leaves the second and third exactly as they were and shrinks the first: the set of things that can supply input goes from "anything on the network" to "anything on this machine."

Whether that's enough depends entirely on what else lives on the machine, and this is where the series folds back on itself. Part 1's whole subject was a class of local process that isn't the user: an AI agent in a sandbox that confined the filesystem and, by policy, left loopback networking open. Every sandbox in that piece's comparison table made the same choice. And the documentation-server's own README now recommends its local REST API as the preferred way for coding agents to use it, with plain unauthenticated calls to 127.0.0.1:3080, as a feature.

To be careful about what that paragraph is and isn't: it's a reading of a design, not a finding. An agent calling an API it was deliberately given is the intended use, not an exploit. I haven't tested any chain against the patched versions and I'm not claiming one. The narrower, defensible statement is this: after the fix, the server's trust model is "local means authorized," and Part 1 is a documented case of what that same assumption cost a different project when one of the local callers was an agent acting on injected text.

What the series actually established

Table 4: the series, on one page.

PieceTargetState of the lockEvidence
Part 1DeepSeek Harness control API (CVE-2026-82533), plus four related sandbox escapesA lock, picked: trust decided by a header the caller writesStand-in reproduction with a real OS-level boundary; public records for the rest
This piece, first halfmcp-documentation-server 1.13.0 (CVE-2026-54504), plus SDK and product advisoriesNo lock: every route open on every interfaceLive reproduction against the real published package
This piece, second halfThe two fixesOne lock added, one door movedStatic diff of published versions; public record for Part 1's fix

The thesis held up in the way that matters: it described a bug in software it wasn't written about (the first half of this piece), and it gave a useful way to read a patch (the second half), by asking which of the three ingredients the patch actually removes. That second use turned out to be the more practical one. "Is it fixed?" has a yes or no answer that's tied to one CVE. "Which ingredient did the fix take away?" tells you what the software still assumes.

The limits are the same ones Part 1 admitted and they haven't gone away. This is two reproduced cases and a larger set of advisories read secondhand, chosen because they fit. It can't show that the pattern is the dominant cause of agent-adjacent vulnerabilities, only that it recurs often enough to be worth checking for first. Several of the supporting advisories in Part 1 and above carry disagreements between sources that I flagged and never resolved. And the comparison of the two fixes leans on a description of the Part 1 fix that I couldn't verify against code.

The line from Part 1 that the whole series kept returning to: "the issue is not simply whether an agent's sandbox holds, but what, inside or outside that sandbox, will eventually trust something the agent produced." After all of it I'd shorten it. The question to ask of any local service isn't where it listens. It's what a caller has to prove.

The last checklist

For finding this kind of bug, read alongside Part 1's list: before running any local tool, agent-adjacent or not, check what it binds to by default, not what its documentation claims; app.listen(PORT) with no host argument is a one-line vulnerability class, and it's worth grepping your own dependencies for it directly rather than trusting a changelog; treat "local-only" as a claim to verify, not a property to assume, especially for anything that starts a web server automatically without being asked; and if a tool exposes an MCP interface built on a third-party SDK, check that SDK's own security advisories separately, the vulnerability may not be in the tool's code at all.

For reading a fix, your own or someone else's:

  1. Name the ingredient the patch removes. Input reach, capability, or ambient authority. If it's only reach, write down who can still reach it.
  2. Treat "binds to localhost" as a network control, not an authentication control. It answers where a request can come from. It says nothing about which local process sent it, and on a machine running agents, browsers, containers, and dev tools, those are not all the user.
  3. If a local API can change or delete state, give it a credential. A startup token is cheap, it's the shape Part 1's fix took, and it turns "anything local" into "the client I started."
  4. Read the changelog claim against the diff. An earlier draft of this piece repeated a summary saying the default-on behavior had been addressed. The diff is a few lines long and says otherwise.
  5. Check the default, not the option. A service that's off until asked for is a smaller surface than one that's on until told otherwise, whatever interface it binds.
  6. Line your sandbox policy up against your local services. If the sandbox allows loopback and a local service trusts loopback, those two decisions are one boundary, and somebody should own it as one.

Two pieces, one broken lock, one missing lock, and two repairs. The bugs were different every time. The assumption underneath them wasn't: that being nearby is the same as being allowed.