{"id":"CVE-2025-68697","published":"2025-12-26T21:51:12Z","modified":"2025-12-26T22:12:04Z","title":"Self-hosted n8n has Legacy Code node that enables arbitrary file read/write","vendor":"n8n","product":"n8n","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.1,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00265,"percentile":0.18811,"provenance":"source"},"cwes":[{"id":"CWE-269","name":"Improper Privilege Management"},{"id":"CWE-749","name":"Exposed Dangerous Method or Function"}],"references":[{"url":"https://github.com/n8n-io/n8n/security/advisories/GHSA-j4p8-h8mh-rh8q","tags":["x_refsource_CONFIRM"]}],"priority":{"score":8.7,"factors":[{"name":"EPSS percentile","points":3.76},{"name":"CVSS severity","points":4.97}]},"vendorSlug":"n8n","affectedVersions":[{"vendor":"n8n-io","product":"n8n","versions":["< 2.0.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-12-26T22:00:31.636551Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"n8n","vulnerableRanges":[">=1.2.1, <2.0.0"],"patched":["2.0.0"],"from":["GHSA-j4p8-h8mh-rh8q"],"provenance":"source"}],"summary":{"text":"The Code node in self-hosted n8n instances running in legacy (non-task-runner) JavaScript execution mode exposes internal helper functions to workflow code, letting the flaw affect any workflow editor on the platform. An authenticated user with workflow editing access can use these helpers to read and write files on the n8n host with the privileges of the n8n process, subject to any configured file-access restrictions and operating system or container permissions.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:08:25Z"},"euvd":{"id":"EUVD-2025-205453","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-21877","published":"2026-01-08","fixed":"1.121.3","kev":false},{"cve":"CVE-2026-25051","published":"2026-02-04","fixed":"1.123.2","kev":false},{"cve":"CVE-2025-68668","published":"2025-12-26","fixed":"2.0.0","kev":false},{"cve":"CVE-2025-68697","published":"2025-12-26","fixed":"2.0.0","kev":false},{"cve":"CVE-2025-68949","published":"2026-01-13","fixed":"2.2.0","kev":false,"link":{"from":"CVE-2025-68697","to":"CVE-2025-68949","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:n8n","fromFixed":"2.0.0","toFixed":"2.2.0","daysApart":18}]}},{"cve":"CVE-2026-27498","published":"2026-02-25","fixed":"2.2.0","kev":false,"link":{"from":"CVE-2025-68697","to":"CVE-2026-27498","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:n8n","fromFixed":"2.0.0","toFixed":"2.2.0","daysApart":61}]}},{"cve":"CVE-2026-25054","published":"2026-02-04","fixed":"2.2.1","kev":false}],"package":"npm:n8n"}}