Impact
The use of Buffer.allocUnsafe() and Buffer.allocUnsafeSlow() in the task runner allowed untrusted code to allocate uninitialized memory. Such uninitialized buffers could contain residual data from within the same Node.js process (for example, data from prior requests, tasks, secrets, or tokens), resulting in potential information disclosure.
Only authenticated users are able to execute code through Task Runners.
This issue affected any deployment in which both of the following conditions were met: - Task Runners were enabled using N8NRUNNERSENABLED=true (default: false) - Code Node was enabled (default: true)
Patches
Access to unsafe Buffer functions has been removed from the task runner sandbox. All buffer allocations are now zero-filled by default.
- Fixed in: 1.114.3 & 1.115.0 - Action: It is strongly recommended to upgrade to version ≥ 1.114.3 as soon as possible.
Changes introduced in this patch include: - Routing all buffer allocations through Buffer.alloc (which zero-fills) operations where applicable - Adding regression tests to ensure continued enforcement of safe allocation practices
Workarounds
If an immediate upgrade cannot be applied, the following hardening steps are recommended:
- Disable the Code Node by adding n8n-nodes-base.code to the NODESEXCLUDE environment variable - Prefer external mode for isolation: run Task Runners in external mode so that untrusted task code executes in a separate sidecar container rather than within the main n8n process. This configuration significantly reduces the risk of in-process memory disclosure caused by unsafe buffer allocations. In external mode, a launcher manages Task Runner processes in a dedicated sidecar environment, separate from the primary n8n instance. See the n8n documentation for configuration details and required environment variables.
Resources
- Node.js documentation: Buffer.alloc() vs Buffer.allocUnsafe() — background on zero-filled vs uninitialized allocations - n8n Documentation — Task Runners — external mode, setup guide, and environment configuration details - n8n Documentation — Blocking nodes — how to globally disable specific nodes
Impact A vulnerability in n8n allows an attacker to access files on the underlying server through execution of certain form-based workflows. A vulnerable workflow could grant access to an unauthenticated remote attacker. This could result in exposure of sensitive information stored on the system and may enable further compromise depending on deployment configuration and workflow usage.
Patches The issue has been fixed in n8n version 1.121.0. Users should upgrade to this version or later to remediate the vulnerability.
Workarounds No official workarounds are available. As a temporary mitigation, users may restrict or disable publicly accessible webhook and form endpoints until upgrading.