CVE-2025-68697: Self-hosted n8n has Legacy Code node that enables arbitrary file read/write
(updated )
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.
References
Code Behaviors & Features
Detect and mitigate CVE-2025-68697 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →