Skip to main content

n8n CVE-2025-68697

MEDIUM
Improper Privilege Management (CWE-269)
2025-12-26 security-advisories@github.com
5.4
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate as n8n workflow editor
  2. Exploit
    Add Code node in legacy JS mode
  3. Execution
    Invoke internal helper functions
  4. Impact
    Read 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

npm n8n fix: 2.0.0

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

NVD PRIMARY 5.4 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
vuln.today AI 4.2 MEDIUM

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.

3.1 AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N
4.0 AV:N/AC:H/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

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

EPSS Score
0.3%
Top 83% exploitable
Prevalence
Medium
popular self-hosted workflow automation platform, common but not ubiquitous
Data Quality
4 sources
Confidence: Medium

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

27
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +27
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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

cpe:2.3:a:n8n:n8n:*:*:*:*:*:node.js:*:*

More in N8n

View all
CVE-2025-68613 HIGH POC
8.8 Dec 19

Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation

CVE-2026-21877 CRITICAL POC
9.9 Jan 08

n8n workflow automation (through 1.121.2) allows authenticated users to execute arbitrary code via the n8n service, with

CVE-2026-21858 CRITICAL POC
10.0 Jan 08

n8n workflow automation (1.65.0 to 1.121.0) allows unauthenticated file access through form-based workflows. A critical

CVE-2026-1470 CRITICAL POC
9.9 Jan 27

n8n has a fifth critical RCE vulnerability (CVSS 9.9) in the Expression evaluator, enabling code execution through craft

CVE-2025-65964 CRITICAL POC
9.4 Dec 09

Authenticated users who can create or modify an n8n workflow can achieve remote code execution on the n8n host by abusin

CVE-2026-33696 CRITICAL POC
9.4 Mar 25

A prototype pollution vulnerability in the XML and GSuiteAdmin nodes of n8n workflow automation platform allows authenti

CVE-2026-33660 CRITICAL POC
9.4 Mar 25

An authenticated user with workflow creation or modification privileges in n8n workflow automation platform can exploit

CVE-2025-55526 CRITICAL POC
9.1 Aug 26

n8n-workflows Main Commit ee25413 allows attackers to execute a directory traversal via the download_workflow function w

CVE-2026-27493 CRITICAL POC
9.0 Feb 25

Second-order expression injection in n8n workflow automation before 2.10.1/2.9.3/1.123.22. Crafted workflow data trigger

CVE-2025-56265 HIGH POC
8.8 Sep 08

An arbitrary file upload vulnerability in the Chat Trigger component of N8N v1.95.3, v1.100.1, and v1.101.1 allows attac

CVE-2026-33665 HIGH POC
8.8 Mar 25

Authenticated n8n users can hijack administrator accounts when LDAP authentication is enabled by manipulating their LDAP

CVE-2023-27563 HIGH POC
8.8 May 10

The n8n package 0.218.0 for Node.js allows Escalation of Privileges. Rated high severity (CVSS 8.8), this vulnerability

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy