
Cybersecurity researchers have detailed two security flaws that have been patched in the n8n workflow automation platform. This includes two critical bugs that could lead to the execution of arbitrary commands.
The vulnerabilities are listed below –
CVE-2026-27577 (CVSS score: 9.4) – Expression sandbox escape leading to remote code execution (RCE) CVE-2026-27493 (CVSS score: 9.5) – Unauthenticated expression evaluation via form node in n8n
“CVE-2026-27577 is a sandbox escape in the expression compiler. A missing case in the AST rewriter allows the process to slip through untranslated, giving the authenticated expression a full RCE,” Pillar Security researcher Eilon Cohen, who discovered and reported the issue, said in a report shared with The Hacker News.
The cybersecurity firm described CVE-2026-27493 as a “double evaluation bug” in n8n’s form nodes. This bug can be exploited for expression injection by taking advantage of the fact that form endpoints are public by design and do not require authentication or an n8n account.
All that is required for a successful exploit is to utilize a publicly available “contact us” form to execute arbitrary shell commands by simply entering the payload as input in the name field.
In an advisory released late last month, n8n said CVE-2026-27577 could be weaponized by an authenticated user with privileges to create or modify workflows to cause unintended system command execution on a host running n8n via a crafted expression in a workflow parameter.

N8n also noted that CVE-2026-27493, when chained with sandbox escape expressions like CVE-2026-27577, could “escalate to remote code execution on n8n hosts.” Both vulnerabilities affect self-hosted and cloud deployments of n8n.
< 1.123.22、>= 2.0.0 < 2.9.3、および >= 2.10.0 < 2.10.1 - Fixed in versions 2.10.1, 2.9.3, and 1.123.22.
If immediate patching for CVE-2026-27577 is not possible, we recommend restricting workflow creation and editing privileges to fully trusted users and deploying n8n in a hardened environment with limited operating system permissions and network access.
Regarding CVE-2026-27493, n8n recommends the following mitigations:
Please manually check the form node usage for the above prerequisites. Disable the Form node by adding n8n-nodes-base.form to the NODES_EXCLUDE environment variable. Disable the form trigger node by adding n8n-nodes-base.formTrigger to the NODES_EXCLUDE environment variable.
“These workarounds do not fully remediate the risk and should only be used as short-term mitigation,” the administrator warned.
Pillar Security said an attacker could exploit these flaws to read the N8N_ENCRYPTION_KEY environment variable and use it to decrypt all credentials stored in n8n’s database, including AWS keys, database passwords, OAuth tokens, and API keys.
N8n versions 2.10.1, 2.9.3, and 1.123.22 also resolve two additional critical vulnerabilities that could be exploited to achieve arbitrary code execution.
CVE-2026-27495 (CVSS score: 9.4) – An authenticated user with privileges to create or modify workflows could potentially execute arbitrary code outside the bounds of the sandbox by exploiting a code injection vulnerability in the JavaScript Task Runner sandbox. CVE-2026-27497 (CVSS score: 9.4) – An authenticated user with privileges to create or modify workflows may be able to execute arbitrary code and write arbitrary files on the n8n server by leveraging SQL query mode in a merge node.
In addition to restricting workflow creation and editing privileges to trusted users, n8n outlines the following workarounds for each flaw.
CVE-2026-27495 – Use external runner mode (N8N_RUNNERS_MODE=external) to limit explosion radius. CVE-2026-27497 – Add n8n-nodes-base.merge to the NODES_EXCLUDE environment variable to disable merge nodes.
Although n8n does not mention that these vulnerabilities are being exploited in the wild, users are advised to keep their installations up to date for optimal protection.
Source link
