n8n
CVE-2025-68697
MEDIUM
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as n8n workflow editor
-
ExploitAdd Code node in legacy JS mode
-
ExecutionInvoke internal helper functions
-
ImpactRead or write host filesystem files
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V8 - Authorization Least privilege enforcement
MITRE ATT&CK
1 technique across 1 tactic: Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires (1) a self-hosted n8n instance where the Code node runs in legacy (non-task-runner) JavaScript execution mode - this is NOT the default on n8n 1.71.0+ (where N8N_RUNNERS_ENABLED can enable task runners) and is eliminated in 2.0.0; and (2) an authenticated user who has been granted workflow-editing access. Exploitation is further limited by any configured file-access restrictions: N8N_RESTRICT_FILE_ACCESS_TO scoping reads/writes to a dedicated directory, the default N8N_BLOCK_FILE_ACCESS_TO_N8N_FILES=true blocking the .n8n directory, and underlying OS/container filesystem permissions. Impact is bounded to the privileges of the n8n process. The dominant limiting factors are the authenticated workflow-editor trust level and the non-default legacy execution mode, making this primarily an insider/over-privileged-user risk rather than an external remote threat. |
| Impact | This is a genuine but moderate-priority issue, best characterized as high-trust-boundary abuse rather than a broadly exploitable vulnerability. The CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N, 5.4 Medium) correctly reflects that exploitation requires an already-authenticated user with workflow editing privileges (PR:L) - this is not an anonymous remote attack. The signals are consistent and point to low urgency: EPSS is 0.27% (17th percentile), there is no CISA KEV listing, and no public exploit code is referenced in the provided data. The CVSS complexity is rated AC:L, but a material limiting condition exists that the base vector understates - the Code node must be running in legacy (non-task-runner) JavaScript mode, which is no longer the default in n8n 1.71.0+ and is replaced entirely in 2.0.0. The low CVSS, low EPSS, and absence of KEV/POC all agree: this is a privilege-boundary weakness for self-hosted operators who grant workflow-editing access to not-fully-trusted users, not a mass-exploitation threat. The confidentiality rating (C:L) is arguably conservative - arbitrary host file read could expose sensitive data (C:H) if N8N_RESTRICT_FILE_ACCESS_TO is not configured, so real impact is deployment-dependent. |
| Exploit ScenarioDerived | An authenticated n8n user who has been granted workflow-editing rights (e.g., a lower-trust team member) creates or edits a Code node on a self-hosted instance still running legacy JavaScript execution mode, and from within it invokes internal helper functions to read sensitive files from the host (such as credentials or config outside the .n8n directory) or write files to the host filesystem, all with the privileges of the n8n process. No public exploit code is referenced in the provided data. Exploitation requires valid authenticated access and the non-default legacy execution mode, limiting it to insider or compromised-account scenarios. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 13, 2026
Authenticated users with workflow-editing access on self-hosted n8n instances that still execute the Code node in legacy (non-task-runner) JavaScript mode can invoke internal helper functions to read and write files on the n8n host with the same privileges as the n8n process. Exploitation requires the non-default legacy execution mode, which is eliminated in n8n 2.0.0 and can be avoided on 1.71.0+ by enabling task runners, and impact is further bounded by configured file-access restrictions and OS/container permissions, so the practical risk is over-privileged-insider abuse rather than an external remote attack. There is no public exploit identified at time of analysis and EPSS is low at 0.27% (17th percentile); a vendor patch is available in version 2.0.0.
RemediationAI
Upgrade to n8n 2.0.0 or later, which enables task runners by default for Code node execution and removes the legacy in-process execution path (vendor-released patch: 2.0.0). If an immediate upgrade is not possible, on n8n 1.71.0 and above enable task runners by setting N8N_RUNNERS_ENABLED=true; this is the most effective compensating control because it restores process isolation for user code. Operators who cannot enable task runners should scope file access by setting N8N_RESTRICT_FILE_ACCESS_TO to a dedicated directory such as ~/.n8n-files that contains no sensitive data (trade-off: legitimate workflows needing broader file access will break), keep N8N_BLOCK_FILE_ACCESS_TO_N8N_FILES=true in its default state to block access to .n8n and user-defined config files, and, if workflow editors are not fully trusted, disable high-risk nodes including the Code node via NODES_EXCLUDE (trade-off: any workflow depending on those nodes stops functioning). Documentation for these settings is linked in the advisory: task runners at https://docs.n8n.io/hosting/configuration/task-runners/, task-runner environment variables at https://docs.n8n.io/hosting/configuration/environment-variables/task-runners/, security environment variables at https://docs.n8n.io/hosting/configuration/environment-variables/security/#security-environment-variables, and v2.0 breaking changes at https://docs.n8n.io/2-0-breaking-changes/#enable-task-runners-by-default.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-269 (Improper Privilege Management): the n8n Code node, when run in legacy in-process JavaScript execution mode rather than in an isolated task runner, exposes internal helper functions that a workflow editor can call from within user-supplied code. Because that code runs in the same process context as n8n itself, the editor inherits the n8n process's filesystem privileges, turning a workflow-authoring capability into host-level file read/write. n8n's mitigation model moved Code node execution into task runners, which provide process and privilege separation so user code no longer shares the n8n runtime. Affected builds are the npm package n8n from 1.2.1 up to (but not including) 2.0.0, matching CPE cpe:2.3:a:n8n:n8n:*:*:*:*:*:node.js:*:*; only self-hosted deployments using the legacy execution path are exposed, since the flaw depends on local execution-mode configuration rather than a remotely reachable service endpoint. Existing controls such as N8N_RESTRICT_FILE_ACCESS_TO and the default N8N_BLOCK_FILE_ACCESS_TO_N8N_FILES limit which paths are reachable and cap the blast radius, and the CVSS vector (AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N at 5.4, assessed independently as AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N) confirms an authenticated (PR:L) low-confidentiality/low-integrity impact with no availability effect and no scope change.
Know when N8n gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
Authenticated workflow editor gives PR:L; reliance on non-default legacy execution mode justifies AC:H; host file read/write yields C:L/I:L, A:N as service availability is not directly affected.
Primary rating from NVD.
CVSS VectorNVD
DescriptionNVD
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Affected Products (CPE)NVD
Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation
n8n workflow automation (through 1.121.2) allows authenticated users to execute arbitrary code via the n8n service, with
n8n workflow automation (1.65.0 to 1.121.0) allows unauthenticated file access through form-based workflows. A critical
n8n has a fifth critical RCE vulnerability (CVSS 9.9) in the Expression evaluator, enabling code execution through craft
Authenticated users who can create or modify an n8n workflow can achieve remote code execution on the n8n host by abusin
A prototype pollution vulnerability in the XML and GSuiteAdmin nodes of n8n workflow automation platform allows authenti
An authenticated user with workflow creation or modification privileges in n8n workflow automation platform can exploit
n8n-workflows Main Commit ee25413 allows attackers to execute a directory traversal via the download_workflow function w
Second-order expression injection in n8n workflow automation before 2.10.1/2.9.3/1.123.22. Crafted workflow data trigger
An arbitrary file upload vulnerability in the Chat Trigger component of N8N v1.95.3, v1.100.1, and v1.101.1 allows attac
Authenticated n8n users can hijack administrator accounts when LDAP authentication is enabled by manipulating their LDAP
The n8n package 0.218.0 for Node.js allows Escalation of Privileges. Rated high severity (CVSS 8.8), this vulnerability
NVD
CVE.org
EPSS
GitHub
Exploit-DB