Executive brief
n8n is a workflow automation platform used to connect and orchestrate applications. In self-hosted instances using legacy code execution mode, authenticated users with workflow editing permissions can read and write files on the host system with the same privileges as the n8n process, potentially exposing sensitive configuration files or enabling persistence attacks.
Technical details
The vulnerability exists in n8n's Legacy Code node when running in non-task-runner JavaScript execution mode (versions 1.2.1 through 1.71.x without task runners enabled). Authenticated workflow editors can invoke internal helper functions to perform arbitrary file operations on the host filesystem. The root cause is improper privilege management and exposure of dangerous functions without sufficient isolation. Attack precondition: attacker must be authenticated with workflow editing access. Impact includes arbitrary file read (subject to OS/container permissions) and write operations. Mitigation: upgrade to v2.0.0+ where task runners are default, enable task runners in v1.71.0+, or restrict file access via environment variables.
Affected products
- n8n n8n >=1.2.1, <2.0.0
Timeline
- 2025-12-26: disclosed