CVE-2025-68697 — Vulnerability in n8n — CVE Details
Self-hosted n8n has Legacy Code node that enables arbitrary file read/write
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.35%). Schedule for your next planned update.
Does your project use an affected n8n version?
Paste your package-lock.json to check it for CVE-2025-68697 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Impact
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)
- Writing files to the host filesystem (subject to the same restrictions)
Starting with n8n version 1.2.1, access to files in the n8n home directory (.n8n) is blocked by default. However, this does not restrict access to other parts of the filesystem unless additional file access limitations are configured.
Patches
- Upgrade to n8n version 2.0.0 or later, where task runners are enabled by default for Code node execution.
- On n8n version 1.71.0 and above, enable task runners by setting
N8N_RUNNERS_ENABLED=true.
Workarounds
If you cannot immediately migrate to task runners:
- Limit file operations by setting
N8N_RESTRICT_FILE_ACCESS_TOto a dedicated directory (e.g.,~/.n8n-files) and ensure it contains no sensitive data. - Keep
N8N_BLOCK_FILE_ACCESS_TO_N8N_FILES=true(default) to block access to.n8nand user-defined config files. - If workflow editors are not fully trusted, consider disabling high-risk nodes (including the Code node) using
NODES_EXCLUDE.
Resources
- n8n Docs: Task runners
- n8n Docs: Task runner environment variables
- n8n Docs: Security environment variables
- n8n Docs: v2.0 breaking changes
Advisory Timeline
- First published December 26, 2025 (335 days ago).
- Last revised December 31, 2025 — 4 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
npm install n8n@2.0.0
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: npm (1).
| Package | Fixed In |
|---|---|
| n8n npm · Affected: All versions | 2.0.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-269Improper Privilege ManagementMITRE
- CWE-749
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.1 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N
References
Frequently Asked Questions
- What is CVE-2025-68697?
- Self-hosted n8n has Legacy Code node that enables arbitrary file read/write. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.1/10).
- How do I check if my project is affected by CVE-2025-68697?
- CVE-2025-68697 affects n8n. It has a 0.4% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-68697 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 21.5% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-33660CRITICAL
n8n has Multiple Remote Code Execution Vulnerabilities in Merge Node AlaSQL SQL Mode
- CVE-2026-65592HIGH
n8n: Stored DOM XSS via Resource Locator `cachedResultUrl`
- CVE-2026-86081HIGH
n8n: Regular Expression Denial of Service in the Default Blocked-File-Pattern Match via a Git Node Clone Path
- CVE-2026-86080MEDIUM
n8n: GitHub Trigger 422 Reuse Path Skips Webhook Secret Storage, Causing Signature Verification to Fail-Open
- CVE-2026-54310MEDIUM
n8n: SQL Injection in Postgres v1/TimesclaeDB Nodes
- CVE-2026-72769MEDIUM
n8n: Prototype Pollution via VM Expression Engine Sandbox Escape Leads to Denial of Service
- CVE-2026-33749MEDIUM
n8n Vulnerable to XSS via Binary Data Inline HTML Rendering
- CVE-2026-86995MEDIUM
n8n: Git Node branch.<name>.remote Config Key Bypasses Sandbox Path Restriction, Enabling Local Git Repository Read