UTC
High

faf-mcp has an arbitrary local file read/write via unconfined `path` argument in FAF tools

GHSA-j4r7-8ph4-43g3 · published 2026-08-19

Severity
High
CVSS score
7.5
Chance of exploitation (EPSS)
No CVE
Fixed in
2.1.3
What it is

An MCP client — or an LLM prompt-injected via attacker-controlled content (a web page, README, ticket, or .faf) into issuing a tool call — can read any file the server process can read: SSH keys (~/.ssh/idrsa), cloud credentials (~/.aws/credentials), .env files, source, /etc/passwd; and fafwrite could write outside the project. This is a sensitive-information-disclosure (CWE-200) primitive that far exceeds the declared .faf project-context scope. The server runs over stdio, so the read/write is reached by a crafted tool call (e.g. a prompt-injected agent processing attacker-controlled content).

What to do

Upgrade faf-mcp to 2.1.3 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 2.1.3 by confining every caller-supplied path before any filesystem access (safe-path.ts): Reads are restricted to .faf / .fafm context files, so non-context files (secrets) are refused regardless of directory. General file ops (fafread / fafwrite) are confined to the project root (cwd + system temp; override with FAFALLOWEDROOTS). Upgrade: npm install -g [email protected] (or npx faf-mcp).

If you cannot upgrade yet

If you cannot upgrade immediately, run the server only against trusted local projects, and set FAFALLOWEDROOTS (patched versions) to a single project directory for a hard directory boundary.

Affected
PackageRegistryAffectedFixed in
faf-mcpnpm<= 2.1.22.1.3

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].