n8n Form Injection and Sandbox Escape: Two Bugs Behind Unauthenticated RCE
Pillar chained a Form double-evaluation flaw and a separate expression sandbox escape in n8n, a workflow platform used for AI integrations, to demonstrate unauthenticated host-command execution. The public entry requires a downstream Form field beginning with = and interpolating anonymous input. The demonstration establishes command execution, not subsequent credential theft.
Two flaws cross two boundaries: n8n expressions are small formulas used to populate workflow fields. Pillar showed a Form value being evaluated twice, followed by a separate SpreadElement omission in the compiler’s abstract syntax tree rewriter. The omission exposes the real Node.js process and child_process module.
The vendor narrows the entry condition: CVE-2026-27493 requires a downstream Form field that starts with = and interpolates anonymous input. n8n assesses this unusual configuration as High severity, differing from the broader researcher framing. CVE-2026-27577 is the separate sandbox escape; by itself, its advisory requires an authenticated workflow creator or editor.
Observed execution is not observed theft: the demonstration returns shell-command output through the Form response. A service-level compromise could expose the database and N8N_ENCRYPTION_KEY if accessible, but the sources do not establish actual harvesting of all AI-provider keys or cross-tenant compromise. They also do not establish malicious exploitation of this exact chain.
Deployed AI Software Vulnerability Remediation Lifecycle
Very High
The n8n deployment owner must roll out a currently supported release containing both Form and expression fixes. The vendor’s historical fixed branches are 1.123.22, 2.9.3 and 2.10.1. Rebuild and verify every serving replica and worker; test the unusual leading-equals Form fixture separately from an authenticated expression fixture. Cloud customers must obtain rollout confirmation from the provider. Fixing only the sandbox does not remove expression injection.
Self-hosted operators can constrain the entire n8n service with non-root execution, dropped capabilities, no host home or Docker socket and only required volumes. This limits what a successful expression escape can touch; it does not turn the expression compiler into a safe sandbox or protect secrets legitimately readable by n8n. Check effective runtime permissions and harmless denied host accesses.
An external firewall or enforcing CNI can deny new connections from the compromised n8n workload except approved workflow integrations. Inventory required model/provider routes and verify permitted traffic plus a known-live denied destination from the actual service. This constrains callbacks and new exfiltration routes; it cannot stop command output returned over the already-permitted public Form response.
After preserving evidence and isolating the affected runtime, an authorized managed-Linux administrator can terminate the compromised n8n main runtime and native child processes; Cloud tenants must involve the provider. Bind the approved population to host, PID namespace, start time, executable identity and cgroup membership; use pidfd-based termination, disable relaunch, and obtain separately credentialed complete-process absence checks. A successful kill command or a missing process name is insufficient. A root-compromised host cannot prove its own cleanliness: use a trusted external/recovery vantage or leave the result unresolved. This response still requires separate patching, artifact cleanup and revocation of any exposed credentials.
What Defenders Should Do Now
Patch both weaknesses. The affected ranges are versions below 1.123.22, 2.0.0 through versions below 2.9.3, and 2.10.0 through versions below 2.10.1. Use a currently supported release containing the fixes, read back every running instance and test Form rendering separately from expression isolation. Hosted customers should confirm provider remediation.
Until updated, follow the vendor’s temporary mitigations: review the leading-equals/interpolation combination, remove the affected exposure or exclude n8n-nodes-base.form and n8n-nodes-base.formTrigger through NODES_EXCLUDE where appropriate. Restrict workflow editing to trusted users. Native Form authentication is useful when anonymous access is unnecessary; changing the intended public service requires a business decision.
Constrain the entire service with non-root execution, restricted mounts and external network policy. External Code-node task runners do not automatically move vulnerable Form expression evaluation out of the main process. Outbound filtering also cannot prevent disclosure returned in the permitted Form response.
If execution is suspected, preserve workflow revisions, request/execution logs and runtime evidence, then isolate and rebuild from a fixed trusted artifact. Inventory accessible integration secrets and revoke exposed upstream credentials at their issuers; merely changing the stored n8n encryption key is not upstream credential revocation.
Conclusion
The strongest preventive mapping is a verified rollout of both product fixes. Service isolation and egress controls reduce consequences at different boundaries, with explicit limits for data and credentials the n8n process must legitimately access. If native execution has already occurred, exact-process termination on a supported managed Linux host is a separate response step; patching or revoking a credential does not stop that execution.