CVE-2026-55557: browse-mcp has an arbitrary file write via unconfined download and state paths
browse-mcp, an npm MCP server that gives AI agents a browser, lets its caller write attacker-controlled bytes to any path the process can reach. The `browser_download`, `browser_save_state` and `browser_load_state` tools did not confine their paths. Versions up to 0.8.1 are affected, and 0.8.2 is the fix.
Published Aug 25, 2026 · Analysis Oct 25, 2026
What an attacker can do
browser_download wrote the fetched file to join(save_dir, filename) with no check on save_dir. browser_save_state and browser_load_state used an explicit path as given. The MCP caller picks these arguments, and so does the URL whose response body becomes the file content. An attacker who controls the caller can therefore drop a file anywhere the browse-mcp process can write, such as ~/.bashrc, an autostart entry or a cron file. That can turn into code execution on the host.
The attacker is either a malicious MCP client or, more commonly, content that steers an agent: a visited web page carrying an indirect prompt injection that tells the agent to call browser_download with a chosen save_dir. No account on the host is needed.
A second flaw sat in the force_fetch fallback. It used a raw fetch() that skipped the BROWSE_MCP_ALLOWED_ORIGINS origin fence, so a download could reach origins you had blocked.
The advisory rates the local, agent-mediated case around CVSS 7.8. The data panel carries a CVSS 4.0 score of 8.6.
Who is affected
npm package browse-mcp version 0.8.1 and earlier. The three tools affected are browser_download, browser_save_state and browser_load_state. Servers started with BROWSE_MCP_TOOLS set to a list that leaves them out do not expose them to an agent, though the advisory notes a malicious client can still call them by name.
Check:
npm ls -g browse-mcp
npm ls browse-mcpIf you launch it with npx, check which version your MCP client config pins.
browse-mcp
- Ecosystem
- npm
- Affected
- <= 0.8.1
- Fixed in
- 0.8.2
- Check
npm ls browse-mcp
How to fix it
Upgrade to 0.8.2:
npm install [email protected]The release confines save_dir under ~/.browse-mcp/downloads and explicit state paths under ~/.browse-mcp/state. Absolute paths and .. escapes are rejected, and download filenames are cut to a bare basename. force_fetch now honors BROWSE_MCP_ALLOWED_ORIGINS and BROWSE_MCP_BLOCKED_ORIGINS. Set BROWSE_MCP_HOME to move the data roots.
Workaround from the advisory: set BROWSE_MCP_TOOLS to a set that excludes browser_download, browser_save_state and browser_load_state (SECURITY.md has a hardened recipe). This hides the tools from an agent but does not stop a malicious MCP client, so upgrade.
How to tell if you were hit
Review MCP tool-call logs for browser_download, browser_save_state or browser_load_state calls whose save_dir or path is absolute or contains ... Then check the files those paths point at: shell startup files (~/.bashrc, ~/.profile), autostart entries and cron files for recent changes you did not make.
Beam records agent MCP tool calls and file access, and its rules can flag writes to shell startup files, which is where this flaw would show up.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Impact
browser_download wrote a fetched file to join(save_dir, filename) with no validation of save_dir, and browser_save_state / browser_load_state honored an explicit path unchanged. The MCP caller controls these arguments (a malicious MCP client, or an autonomous agent steered by indirect prompt injection on a visited page), so an attacker could supply an arbitrary save_dir (or state path) together with a URL whose response body became the file contents, writing attacker-controlled bytes to any path the process can reach (for example ~/.bashrc, an autostart entry, or a cron file). That is an arbitrary file write that can lead to host code execution. The force_fetch fallback additionally used a raw fetch() that bypassed the BROWSE_MCP_ALLOWED_ORIGINS origin fence.
Estimated severity: CVSS 3.1 around 7.8 (High) for the local / agent-mediated case.
Patches
Fixed in 0.8.2. save_dir is confined under the download root (~/.browse-mcp/downloads) and the explicit state path under ~/.browse-mcp/state; absolute paths and .. escapes are rejected, and download filenames are reduced to a bare basename. force_fetch now also honors the origin fence. Data roots remain relocatable via BROWSE_MCP_HOME. Upgrade to browse-mcp 0.8.2.
Workarounds
Restrict the exposed tools with BROWSE_MCP_TOOLS to a set that excludes browser_download, browser_save_state, and browser_load_state (for example the hardened recipe in SECURITY.md). Note that the allowlist hides the tools from an agent but does not stop a malicious MCP client from calling them by name, so upgrading is the real fix.
- Reported privately by novice-22.
Credited to novice-22.
Questions
- Can a web page exploit browse-mcp without a malicious client?
Indirectly, yes. The advisory describes an autonomous agent steered by indirect prompt injection on a visited page. The page cannot call the tool itself, but it can instruct the agent to.
- Does limiting tools with BROWSE_MCP_TOOLS fix this?
It reduces exposure to an agent by hiding the three tools. The advisory says it does not stop a malicious MCP client from calling them by name, so upgrading to 0.8.2 is the real fix.
- Where can downloads go after the fix?
Under
~/.browse-mcp/downloads, and saved state under~/.browse-mcp/state. SettingBROWSE_MCP_HOMErelocates those roots.
References
Read for this analysis:
- https://github.com/That1Drifter/browse-mcp/blob/v0.8.2/CHANGELOG.md
- https://github.com/advisories/GHSA-m9mq-7m7q-xc6p
- https://github.com/That1Drifter/browse-mcp/security/advisories/GHSA-m9mq-7m7q-xc6p
- https://github.com/That1Drifter/browse-mcp/pull/58
- https://github.com/That1Drifter/browse-mcp/commit/5352a4a56f626254b445bfa07e4bb48c5aad15c1
- https://github.com/That1Drifter/browse-mcp/blob/v0.8.2/CHANGELOG.md#082---2026-06-13
- https://github.com/That1Drifter/browse-mcp/releases/tag/v0.8.2
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Other MCP servers and tools vulnerabilities
All Other MCP servers and tools entriesCVE-2026-77361
obsidian-tc : Symlink read-ACL scope bypass via lexical path checks
medium4.7Oct 23, 2026CVE-2026-114126
Storybook dev server vulnerable to code injection from the local network
high8.7Oct 22, 2026CVE-2026-113731
djust: Arbitrary absolute-path file read in the find_handlers_for_template MCP tool
low3.3Oct 21, 2026CVE-2026-114125
Storybook: Missing origin validation in Storybook preview allows code injection from malicious websites
critical9.4Oct 21, 2026CVE-2026-111770
MCP TypeScript server SDK: Shared transport or server instances delivered one HTTP client's messages to another
high7.7Oct 20, 2026GHSA-953h-535j-jg2v
agent-router: MCP session resume does not verify the embedded anti-hijacking subject; default Helm seed makes session IDs forgeable
medium6.8Oct 19, 2026
