Self-hosted n8n has Legacy Code node that enables arbitrary file read/write
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Privilege escalation
- Confidentiality · integrity · availability
- Low · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-269.
Summary
n8n is an open source workflow automation platform. Prior to version 2.0.0, in self-hosted n8n instances where the Code node runs in legacy (non-task-runner) JavaScript execution mode, authenticated users with workflow editing access can invoke internal helper functions from within the Code node. This allows a workflow editor to perform actions on the n8n host with the same privileges as the n8n process, including: reading files from the host filesystem (subject to any file-access restrictions configured on the instance and OS/container permissions), and writing files to the host filesystem (subject to the same restrictions). This issue has been patched in version 2.0.0. Workarounds for this issue involve limiting file operations by setting N8N_RESTRICT_FILE_ACCESS_TO to a dedicated directory (e.g., ~/.n8n-files) and ensure it contains no sensitive data, keeping N8N_BLOCK_FILE_ACCESS_TO_N8N_FILES=true (default) to block access to .n8n and user-defined config files, and disabling high-risk nodes (including the Code node) using NODES_EXCLUDE if workflow editors are not fully trusted.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| n8n | n8n | before 2.0.0 | 2.0.0 | Patch available | CNA |
| — | n8n (npm) | 1.2.1 to before 2.0.0 | 2.0.0 | Patch available | GHSA-j4p8-h8mh-rh8q |
- n8n Vendorn8n Affected before 2.0.0 Fixed in 2.0.0 Patch available CNA
- n8n (npm) Vendor— Affected 1.2.1 to before 2.0.0 Fixed in 2.0.0 Patch available GHSA-j4p8-h8mh-rh8q
Remediation
- Fix · CNA n8n (n8n-io) Fixed in 2.0.0
- Fix · GHSA-j4p8-h8mh-rh8q n8n (npm) Fixed in 2.0.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2025-68697
- 2026-10-03 Alias added: GHSA-j4p8-h8mh-rh8q
References
More N8n vulnerabilities
- TI-2025-42131 n8n Vulnerable to Remote Code Execution via Expression Injection KEVCVSS 3.1CRITICAL 10.0
- TI-2026-17560 n8n Vulnerable to Unauthenticated File Access via Improper Webhook Request Handling CVSS 3.1CRITICAL 10.0
- TI-2026-01167 Authenticated users can bypass the Expression sandbox mechanism to achieve full remote… CVSS 3.1CRITICAL 9.9
- TI-2026-00644 Sandbox escape in n8n Python task runner allows for arbitrary code execution on the underlying host. CVSS 3.1CRITICAL 9.9
- TI-2025-35293 An arbitrary file upload vulnerability in the Chat Trigger component of N8N v1.95.3… CVSS 3.1HIGH 8.8
- TI-2023-12275 The n8n package 0.218.0 for Node.js allows Escalation of Privileges. CVSS 3.1HIGH 8.8
Sources
- CVE-2025-68697 · CVE Program
- CVE-2025-68697 · NVD
- FIRST EPSS
- GHSA-j4p8-h8mh-rh8q · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences