CVE-2025-68697
Self-hosted n8n has Legacy Code node that enables arbitrary file read/write
Description
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.
INFO
Published Date :
Dec. 26, 2025, 10:15 p.m.
Last Modified :
Oct. 13, 2026, 9:10 a.m.
Remotely Exploit :
Yes !
Source :
[email protected]
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 3.1 | HIGH | [email protected] | ||||
| CVSS 3.1 | HIGH | MITRE-CVE | ||||
| CVSS 3.1 | MEDIUM | [email protected] |
Solution
- Update n8n to version 2.0.0 or later.
- Limit file operations with N8N_RESTRICT_FILE_ACCESS_TO.
- Ensure N8N_BLOCK_FILE_ACCESS_TO_N8N_FILES is true.
- Exclude Code node if editors are untrusted.
Public PoC/Exploit Available at Github
CVE-2025-68697 has a 1 public
PoC/Exploit available at Github.
Go to the Public Exploits tab to see the list.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2025-68697.
| URL | Resource |
|---|---|
| https://github.com/n8n-io/n8n/security/advisories/GHSA-j4p8-h8mh-rh8q | Patch Vendor Advisory |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2025-68697 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2025-68697
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
None
Shell
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2025-68697 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2025-68697 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Translated by [email protected]
Oct. 13, 2026
Action Type Old Value New Value Added Translation Title: n8n, Description: n8n es una plataforma de automatización de flujos de trabajo de código abierto. Antes de la versión 2.0.0, en instancias de n8n autoalojadas donde el nodo Code se ejecuta en modo de ejecución de JavaScript heredado (no task-runner), los usuarios autenticados con acceso de edición de flujos de trabajo pueden invocar funciones auxiliares internas desde dentro del nodo Code. Esto permite a un editor de flujos de trabajo realizar acciones en el host de n8n con los mismos privilegios que el proceso de n8n, incluyendo: leer archivos del sistema de archivos del host (sujeto a cualquier restricción de acceso a archivos configurada en la instancia y permisos de SO/contenedor), y escribir archivos en el sistema de archivos del host (sujeto a las mismas restricciones). Este problema ha sido parcheado en la versión 2.0.0. Las soluciones alternativas para este problema implican limitar las operaciones de archivos configurando N8N_RESTRICT_FILE_ACCESS_TO a un directorio dedicado (p. ej., ~/.n8n-files) y asegurar que no contenga datos sensibles, manteniendo N8N_BLOCK_FILE_ACCESS_TO_N8N_FILES=true (predeterminado) para bloquear el acceso a .n8n y archivos de configuración definidos por el usuario, y deshabilitando nodos de alto riesgo (incluyendo el nodo Code) usando NODES_EXCLUDE si los editores de flujos de trabajo no son de plena confianza. -
CVE Modified by [email protected]
Jun. 17, 2026
Action Type Old Value New Value Added Affected [{'vendor': 'n8n-io', 'product': 'n8n', 'versions': [{'status': 'affected', 'version': '< 2.0.0'}]}] -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Jun. 17, 2026
Action Type Old Value New Value Added SSVC {'id': 'CVE-2025-68697', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'none'}, {'automatable': 'no'}, {'technicalImpact': 'partial'}], 'version': '2.0.3', 'timestamp': '2025-12-26T22:00:31.636551Z'} -
Initial Analysis by [email protected]
Dec. 31, 2025
Action Type Old Value New Value Added CVSS V3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N Added CWE NVD-CWE-noinfo Added CPE Configuration OR *cpe:2.3:a:n8n:n8n:*:*:*:*:*:node.js:*:* versions up to (excluding) 2.0.0 Added Reference Type GitHub, Inc.: https://github.com/n8n-io/n8n/security/advisories/GHSA-j4p8-h8mh-rh8q Types: Patch, Vendor Advisory -
New CVE Received by [email protected]
Dec. 26, 2025
Action Type Old Value New Value Added Description 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. Added CVSS V3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N Added CWE CWE-749 Added CWE CWE-269 Added Reference https://github.com/n8n-io/n8n/security/advisories/GHSA-j4p8-h8mh-rh8q