Product Details
n8n is an open-source workflow automation and integration platform commonly deployed in cloud, containerized, and on-premise environments.
The platform supports custom JavaScript execution, external command invocation, file operations, and credential handling.
Due to these capabilities, weaknesses in input validation, sandbox isolation, or file handling may directly impact the underlying operating system.
Vulnerability Overview
Multiple critical vulnerabilities were identified in n8n affecting command execution, sandbox isolation, and file system access.
Successful exploitation may result in remote code execution, credential disclosure, persistent host compromise, or full infrastructure takeover, depending on deployment configuration and privilege level.
These vulnerabilities are considered highly impactful due to the frequent use of n8n in environments with access to sensitive credentials, APIs, and internal networks.
CVE Summary Table
| CVE ID | Affected Versions | Vulnerability Type | Impact | Severity |
|---|---|---|---|---|
| CVE-2026-21893 | < 1.120.3 | Command Injection | Host RCE | Critical |
| CVE-2026-25115 | < 2.4.8 | Sandbox Escape | Host RCE | Critical |
| CVE-2026-25056 | < 1.118.0 / 2.4.0 | Arbitrary File Write | RCE | Critical |
| CVE-2026-25053 | < 1.123.10 / 2.5.0 | Command Injection | Host Takeover | Critical |
| CVE-2026-25052 | < 1.123.18 / 2.5.0 | Arbitrary File Read | Credential Theft | High |
CVE-2026-21893 – Command Injection Leading to Host RCE
Description
Improper sanitization of user-supplied workflow parameters allows operating system commands to be injected into backend execution contexts.
Command strings are constructed dynamically and passed to shell execution routines without adequate validation.
Attack Vector
Access to workflow creation or modification is required.
Injected shell metacharacters may be interpreted by the system shell during execution of workflow nodes.
Exploitation Details
Payloads may be embedded within workflow inputs, environment variables, or node configuration fields.
When executed, arbitrary system commands may run with the privileges of the n8n process.
Proof-of-concept exploitation techniques have been observed and are available publicly for educational and defensive testing purposes.
Impact
- Remote command execution
- Reverse shell establishment
- Credential harvesting
- Lateral movement
- Full host compromise in privileged deployments
Detection Rules
Process Execution Detection (Linux)
process.name IN ("bash","sh","dash","zsh","curl","wget")
AND process.parent.name = "n8n"
Command Line Inspection
process.command_line LIKE "%;%"
OR process.command_line LIKE "%&&%"
OR process.command_line LIKE "%|%"
Network Egress Monitoring
destination.ip NOT IN (approved_ip_ranges)
AND source.process = "n8n"
Log Sources
- n8n execution logs
- Linux auditd / execve logs
- Container runtime logs
Remediation
Upgrade to a fixed version.
Official Patch / Upgrade
https://github.com/n8n-io/n8n/releases/tag/[email protected]
CVE-2026-25115 – Sandbox Escape Resulting in Host RCE
Description
The JavaScript execution sandbox fails to enforce proper isolation boundaries.
Access to internal Node.js objects is possible, allowing escape from the sandboxed environment.
Attack Vector
Malicious JavaScript payloads may be executed within Function or Code nodes.
Exploitation Details
Prototype manipulation and object reference abuse allow access to restricted modules such as process, fs, and child_process.
Once accessed, system-level commands may be executed outside the intended sandbox.
Observed exploitation methods are currently limited but are considered practical and weaponizable.
Impact
- Sandbox bypass
- Unauthorized file access
- Direct command execution on host
- Security control evasion
Detection Rules
Suspicious Module Access
log.message LIKE "%child_process%"
OR log.message LIKE "%process.env%"
OR log.message LIKE "%require('fs')%"
Unexpected Privilege Changes
process.uid != expected_n8n_uid
Log Sources
- n8n function execution logs
- Node.js runtime logs
- Container security logs
Remediation
Upgrade to the patched release.
Official Patch / Upgrade
https://github.com/n8n-io/n8n/releases/tag/[email protected]
CVE-2026-25056 – Arbitrary File Write Leading to RCE
Description
File write operations do not properly restrict destination paths.
Arbitrary files may be written outside intended directories.
Attack Vector
Authenticated workflow execution with file handling capabilities.
Exploitation Details
Sensitive system locations may be targeted, including cron directories, startup scripts, or application configuration paths.
Persistence mechanisms may be deployed silently.
Public proof-of-concept techniques exist and demonstrate reliable exploitation.
Impact
- Persistent backdoors
- Delayed execution
- Full system compromise
Detection Rules
File Creation Outside Allowed Paths
file.path NOT LIKE "/var/lib/n8n/%"
AND file.creator = "n8n"
Cron Abuse Detection
file.path LIKE "/etc/cron%"
AND file.creator = "n8n"
Log Sources
- File integrity monitoring
- OS audit logs
- Container filesystem logs
Remediation
Upgrade to a secure version.
Official Patch / Upgrade
https://github.com/n8n-io/n8n/releases/tag/[email protected]
CVE-2026-25053 – Command Injection Resulting in Full Host Takeover
Description
A critical command injection vulnerability exists in exposed execution endpoints.
Insufficient validation allows attacker-controlled input to be executed directly.
Attack Vector
Remote exploitation is possible in exposed or misconfigured deployments.
Exploitation Details
Crafted HTTP requests may trigger execution paths without authentication.
Execution occurs immediately upon request processing.
Exploitation has been demonstrated in controlled environments for educational purposes.
Impact
- Unauthenticated RCE
- Wormable attack potential
- Complete infrastructure compromise
Detection Rules
HTTP Request Anomaly
http.request.body LIKE "%;%"
OR http.request.body LIKE "%&&%"
Unauthenticated Execution Events
auth.status = "none"
AND action = "workflow_execute"
Log Sources
- Web access logs
- Application request logs
- IDS/IPS telemetry
Remediation
Immediate upgrade is required.
Official Patch / Upgrade
https://github.com/n8n-io/n8n/releases/tag/[email protected]
CVE-2026-25052 – Arbitrary File Read Leading to Credential Theft
Description
Path traversal flaws allow unauthorized file reads.
Sensitive files may be accessed outside approved directories.
Attack Vector
Authenticated workflow execution.
Exploitation Details
Credential files, environment variables, and configuration secrets may be read and exfiltrated.
This vulnerability is commonly chained with other flaws to escalate impact.
Impact
- Credential disclosure
- API key theft
- Cloud account compromise
Detection Rules
Sensitive File Access
file.path IN ("/etc/passwd",".env",".n8n/config")
AND file.access = "read"
Path Traversal Indicators
request.parameter LIKE "%../%"
Log Sources
- File access logs
- Application audit logs
Remediation
Upgrade to the patched version.
Official Patch / Upgrade
https://github.com/n8n-io/n8n/releases/tag/[email protected]
Final Takeaways
- Execution as non-root should be enforced
- Network egress restrictions should be applied
- All credentials should be rotated post-upgrade
- Historical workflow executions should be reviewed
- Compromise should be assumed on unpatched systems
