UTC
High

browse-mcp has an arbitrary file write via unconfined download and state paths

CVE-2026-55557 · GHSA-m9mq-7m7q-xc6p · published 2026-08-25

Severity
High
CVSS score
8.6
Chance of exploitation (EPSS)
0.24%
Fixed in
0.8.2
  • Exploitation No known exploitation
  • Automatable No
  • Technical impact Total
  • CISA SSVC
What it is

browserdownload wrote a fetched file to join(savedir, filename) with no validation of savedir, and browsersavestate / browserloadstate 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 savedir (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.

What to do

Upgrade browse-mcp to 0.8.2 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.

Fixed in 0.8.2. savedir 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. forcefetch now also honors the origin fence. Data roots remain relocatable via BROWSEMCPHOME. Upgrade to browse-mcp 0.8.2.

If you cannot upgrade yet

Restrict the exposed tools with BROWSEMCPTOOLS to a set that excludes browserdownload, browsersavestate, and browserload_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.

Affected
PackageRegistryAffectedFixed in
browse-mcpnpm<= 0.8.10.8.2

The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.

Sources: GitHub Advisory Database, reviewed and malware advisories (CC BY 4.0, https://github.com/advisories); advisories published by Cursor (https://github.com/cursor/cursor/security/advisories); advisories published by OpenClaw (https://github.com/openclaw/openclaw/security/advisories); advisories published by vLLM (https://github.com/vllm-project/vllm/security/advisories); advisories published by Open WebUI (https://github.com/open-webui/open-webui/security/advisories); advisories published by n8n (https://github.com/n8n-io/n8n/security/advisories); advisories published by Flowise (https://github.com/FlowiseAI/Flowise/security/advisories); advisories published by Langflow (https://github.com/langflow-ai/langflow/security/advisories); advisories published by the MCP Python SDK project (https://github.com/modelcontextprotocol/python-sdk/security/advisories); advisories published by MLflow (https://github.com/mlflow/mlflow/security/advisories); CISA Known Exploited Vulnerabilities catalog (CC0). Data as of 2026-11-22. ShieldMap describes how each problem works and how to fix it; it does not publish exploit code. Report a correction to [email protected].