CVE-2026-27498
HIGHAny n8n deployment used as an AI workflow orchestrator is at risk of full host compromise via a low-privileged authenticated user. Patch immediately to 2.2.0 / 1.123.8 — if you can't patch, restrict workflow editing to a minimal set of fully trusted operators and blacklist the Read/Write Files node today. n8n commonly runs with broad network and filesystem access in AI pipeline environments, making RCE here a lateral-movement launchpad across your AI stack.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| n8n | npm | — | No patch |
| n8n | npm | — | No patch |
| n8n | npm | — | No patch |
| n8n | npm | — | No patch |
| n8n | npm | — | No patch |
Severity & Risk
Recommended Action
- 1. PATCH: Upgrade n8n to version 2.2.0 (latest branch) or 1.123.8 (LTS branch) immediately. 2. WORKAROUND if patching delayed: Add `n8n-nodes-base.readWriteFile` to the `NODES_EXCLUDE` environment variable to disable the vulnerable node type. 3. ACCESS CONTROL: Audit and restrict workflow creation/editing permissions — treat this role as privileged. Remove it from generic developer/ops accounts. 4. ISOLATION: Run n8n in a container with read-only filesystem mounts where possible; limit network egress from the n8n host. 5. SECRETS HYGIENE: Rotate all API keys, model credentials, and database passwords stored in n8n workflow configurations post-incident if any unpatched instance was externally accessible. 6. DETECTION: Monitor for unexpected git process spawns from n8n process tree (`git` child of `n8n` or `node`), file writes to `.git/config` or git hook directories, and outbound shell connections from the n8n host.
Classification
Compliance Impact
This CVE is relevant to:
Technical Details
NVD Description
n8n is an open source workflow automation platform. Prior to versions 2.2.0 and 1.123.8, an authenticated user with permission to create or modify workflows could chain the Read/Write Files from Disk node with git operations to achieve remote code execution. By writing to specific configuration files and then triggering a git operation, the attacker could execute arbitrary shell commands on the n8n host. The issue has been fixed in n8n versions 2.2.0 and 1.123.8. Users should upgrade to one of these versions or later to remediate the vulnerability. If upgrading is not immediately possible, administrators should consider the following temporary mitigations. Limit workflow creation and editing permissions to fully trusted users only, and/or disable the Read/Write Files from Disk node by adding `n8n-nodes-base.readWriteFile` to the `NODES_EXCLUDE` environment variable. These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.
Exploitation Scenario
An attacker with a compromised developer account (or a malicious insider) logs into the n8n UI with standard workflow-editor permissions. They create a new workflow containing a Write File node that writes a malicious script to a git hook path (e.g., `.git/hooks/post-checkout`) or patches `.git/config` with a malicious `core.sshCommand` value. They then add a downstream node that triggers a git pull or git checkout operation on a repository the n8n process has access to. When the workflow runs, git executes the attacker-controlled hook, spawning a reverse shell or downloading a second-stage implant. From this foothold, the attacker pivots to exfiltrate LLM API keys, model weights, training datasets, and downstream database credentials embedded in other workflows — all without any elevated initial access.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H References
- github.com/n8n-io/n8n/commit/97365caf253978ba8e46d7bc53fa7ac3b6f67b32 Patch
- github.com/n8n-io/n8n/commit/97365caf253978ba8e46d7bc53fa7ac3b6f67b32 Patch
- github.com/n8n-io/n8n/commit/97365caf253978ba8e46d7bc53fa7ac3b6f67b32 Patch
- github.com/n8n-io/n8n/commit/e22acaab3dcb2004e5fe0bf9ef2db975bde61866 Patch
- github.com/n8n-io/n8n/commit/e22acaab3dcb2004e5fe0bf9ef2db975bde61866 Patch
- github.com/n8n-io/n8n/commit/e22acaab3dcb2004e5fe0bf9ef2db975bde61866 Patch
- github.com/n8n-io/n8n/releases/tag/n8n@1.123.8 Release
- github.com/n8n-io/n8n/releases/tag/n8n@1.123.8 Release
- github.com/n8n-io/n8n/releases/tag/n8n@1.123.8 Release
- github.com/n8n-io/n8n/releases/tag/n8n@2.2.0 Release
- github.com/n8n-io/n8n/releases/tag/n8n@2.2.0 Release
- github.com/n8n-io/n8n/releases/tag/n8n@2.2.0 Release
- github.com/n8n-io/n8n/security/advisories/GHSA-x2mw-7j39-93xq Vendor
- github.com/n8n-io/n8n/security/advisories/GHSA-x2mw-7j39-93xq Vendor
- github.com/n8n-io/n8n/security/advisories/GHSA-x2mw-7j39-93xq Vendor