{"id":"CVE-2026-27498","published":"2026-02-25T22:42:21Z","modified":"2026-02-26T20:21:05Z","title":"n8n has Arbitrary Command Execution via File Write and Git Operations","vendor":"n8n","product":"n8n","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9,"severity":"CRITICAL","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00835,"percentile":0.58605,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/n8n-io/n8n/security/advisories/GHSA-x2mw-7j39-93xq","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/n8n-io/n8n/commit/97365caf253978ba8e46d7bc53fa7ac3b6f67b32","tags":["x_refsource_MISC"]},{"url":"https://github.com/n8n-io/n8n/commit/e22acaab3dcb2004e5fe0bf9ef2db975bde61866","tags":["x_refsource_MISC"]},{"url":"https://github.com/n8n-io/n8n/releases/tag/n8n@1.123.8","tags":["x_refsource_MISC"]},{"url":"https://github.com/n8n-io/n8n/releases/tag/n8n@2.2.0","tags":["x_refsource_MISC"]}],"priority":{"score":18.0,"factors":[{"name":"EPSS percentile","points":11.72},{"name":"CVSS severity","points":6.3}]},"vendorSlug":"n8n","affectedVersions":[{"vendor":"n8n-io","product":"n8n","versions":["< 1.123.8",">= 2.0.0, < 2.2.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-02-26T20:20:10.387603Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"n8n","vulnerableRanges":["<1.123.8",">=2.0.0, <2.2.0"],"patched":["1.123.8","2.2.0"],"from":["GHSA-x2mw-7j39-93xq"],"provenance":"source"}],"summary":{"text":"A code injection flaw in n8n, the open source workflow automation platform, lets an attacker chain the Read/Write Files from Disk node with git operations to run arbitrary shell commands on the n8n host. Exploitation requires an authenticated user with permission to create or modify workflows, and the network-reachable attack path requires no special configuration or user interaction beyond that account access.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:35:00Z"},"euvd":{"id":"EUVD-2026-8760","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-n8n-cve-2025-57749","parents":[{"from":"CVE-2025-57749","to":"CVE-2026-27498","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/core/src/execution-engine/node-execution-context/utils/file-system-helper-functions.ts"],"commits":["https://github.com/n8n-io/n8n/commit/c2c3e08cdf33570d9051e659812cbfbdd3c077fd","https://github.com/n8n-io/n8n/commit/97365caf253978ba8e46d7bc53fa7ac3b6f67b32","https://github.com/n8n-io/n8n/commit/e22acaab3dcb2004e5fe0bf9ef2db975bde61866"],"basis":"rarely changed file"}]},{"from":"CVE-2026-21877","to":"CVE-2026-27498","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/core/src/execution-engine/node-execution-context/utils/file-system-helper-functions.ts"],"commits":["https://github.com/n8n-io/n8n/commit/f4b009d00d1f4ba9359b8e8f1c071e3d910a55f6","https://github.com/n8n-io/n8n/commit/97365caf253978ba8e46d7bc53fa7ac3b6f67b32","https://github.com/n8n-io/n8n/commit/e22acaab3dcb2004e5fe0bf9ef2db975bde61866"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2026-25051","published":"2026-02-04","fixed":"1.123.2","kev":false,"link":{"from":"CVE-2026-25051","to":"CVE-2026-27498","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:n8n","fromFixed":"1.123.2","toFixed":"1.123.8","daysApart":21}]}},{"cve":"CVE-2025-68668","published":"2025-12-26","fixed":"2.0.0","kev":false},{"cve":"CVE-2025-68697","published":"2025-12-26","fixed":"2.0.0","kev":false,"link":{"from":"CVE-2025-68697","to":"CVE-2026-27498","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:n8n","fromFixed":"2.0.0","toFixed":"2.2.0","daysApart":61}]}},{"cve":"CVE-2025-68949","published":"2026-01-13","fixed":"2.2.0","kev":false},{"cve":"CVE-2026-27498","published":"2026-02-25","fixed":"2.2.0","kev":false},{"cve":"CVE-2026-25054","published":"2026-02-04","fixed":"2.2.1","kev":false},{"cve":"CVE-2026-21894","published":"2026-01-08","fixed":"2.2.2","kev":false},{"cve":"CVE-2026-25055","published":"2026-02-04","fixed":"2.4.0","kev":false}],"package":"npm:n8n"}}