9.0critical
n8n has Arbitrary Command Execution via File Write and Git Operations
- Severity
- 9.0critical CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.83% (higher than 58% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-x2mw-7j39-93xq
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| n8n-io n8n | < 1.123.8, >= 2.0.0, < 2.2.0 | CVE List |
| n8n (npm) | before 1.123.8, from 2.0.0 before 2.2.0 | GitHub Advisory Database |
| n8n n8n | before 1.123.8, from 2.0.0 before 2.2.0 | NVD |
All scores
| GitHub_M | 9.0critical CVSS:4.0 | 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 |
| GitHub | 8.5critical CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H |
| GitHub | critical CVSS:4.0 | 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 |
| NVD | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
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.
GitHub Advisory Database
Impact
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.
Patches
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.
Workarounds
If upgrading is not immediately possible, administrators should consider the following temporary mitigations:
- Limit workflow creation and editing permissions to fully trusted users only.
- Disable the Read/Write Files from Disk node by adding
n8n-nodes-base.readWriteFileto theNODES_EXCLUDEenvironment variable.
These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.
NVD (es)
n8n es una plataforma de automatización de flujos de trabajo de código abierto. Antes de las versiones 2.2.0 y 1.123.8, un usuario autenticado con permiso para crear o modificar flujos de trabajo podía encadenar el nodo Read/Write Files from Disk con operaciones git para lograr la ejecución remota de código. Al escribir en archivos de configuración específicos y luego activar una operación git, el atacante podía ejecutar comandos de shell arbitrarios en el host de n8n. El problema ha sido solucionado en las versiones 2.2.0 y 1.123.8 de n8n. Los usuarios deben actualizar a una de estas versiones o posteriores para remediar la vulnerabilidad. Si la actualización no es posible de inmediato, los administradores deben considerar las siguientes mitigaciones temporales. Limite los permisos de creación y edición de flujos de trabajo solo a usuarios de plena confianza, y/o deshabilite el nodo Read/Write Files from Disk añadiendo 'n8n-nodes-base.readWriteFile' a la variable de entorno 'NODES_EXCLUDE'. Estas soluciones provisionales no remedian completamente el riesgo y solo deben usarse como medidas de mitigación a corto plazo.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-27498 changed 2026-02-26 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-x2mw-7j39-93xq changed 2026-02-28 | CC-BY-4.0 |
| NVD | CVE-2026-27498 changed 2026-06-17 | Public domain |