UTC
High

n8n-MCP: Multi-tenant MCP requests fall back to process-level n8n credentials when tenant headers are absent or incomplete

CVE-2026-45707 · GHSA-jxx9-px88-pj69 · published 2026-05-18 · updated 2026-06-09

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

An authenticated MCP tenant exploiting this path could read and write workflows, executions, data-table contents, and credential metadata on the operator's n8n instance. If the operator's n8n permits Code-node execution that reaches OS-level modules, the path could escalate to remote code execution inside the operator's n8n runtime. The process-level N8NAPIKEY is, in practice, a high-privilege key — Community Edition keys are unscoped by default, and even Enterprise scopes were configured for the operator's own needs and would carry over wholesale to a tenant who triggered the fallback.

What to do

Upgrade n8n-mcp to 2.51.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 n8n-mcp 2.51.2. The fix: Rejects header-less multi-tenant requests at the HTTP edge with HTTP 400 / JSON-RPC -32602 before any handler runs. Refuses to construct an env-credential n8n API client when ENABLEMULTITENANT=true. Closes secondary leak paths in trigger handlers and in the responses of n8nhealthcheck, n8ndiagnostic, n8ndeploytemplate, and n8naudit_instance so the operator's URL and env-key indicator are not surfaced to tenants. Single-tenant behavior is unchanged.

If you cannot upgrade yet

If an immediate upgrade is not possible, any one of the following reduces or eliminates exposure: Disable multi-tenant mode. Set ENABLEMULTITENANT=false (or unset it) and run a separate n8n-mcp instance per tenant with that tenant's own N8NAPIURL / N8NAPIKEY. This removes the affected code path entirely. Reject malformed requests at a proxy. Require both x-n8n-url and x-n8n-key headers on every request and return 400 if either is missing. Neutralizes the primary header-omission path but does not address the secondary response-shape disclosures, so this is a partial mitigation only. Reduce the blast radius of the operator API key.

Affected
PackageRegistryAffectedFixed in
n8n-mcpnpm<= 2.51.12.51.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].