n8n
Affected
- introduced
1.2.1, fixed2.0.0(semver)
Fixed versions
2.0.0
Fix
- Fixed version
2.0.0npm install [email protected]
Advisory
Also known as: CVE-2025-68697
Self-hosted n8n has Legacy Code node that enables arbitrary file read/write
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:
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
N8N_RUNNERS_ENABLED=true.Workarounds
If you cannot immediately migrate to task runners:
N8N_RESTRICT_FILE_ACCESS_TO to a dedicated directory (e.g., ~/.n8n-files) and ensure it contains no sensitive data.N8N_BLOCK_FILE_ACCESS_TO_N8N_FILES=true (default) to block access to .n8n and user-defined config files.NODES_EXCLUDE.Resources
High Basis: The source's own band: HIGH
1.2.1, fixed 2.0.0 (semver)2.0.0
2.0.0npm install [email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0