NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · n8n

CVE-2025-61917: n8n's Unsafe Buffer Allocation Allows In-Process Memory Disclosure in Task Runner

highCVSS 3.1 7.7GHSA-49mx-fj45-q3p6

n8n versions from 1.65.0 up to 1.114.3 let an authenticated user read leftover memory from the n8n process through the Code node when task runners are on. Code in the task runner could call Buffer.allocUnsafe() and Buffer.allocUnsafeSlow(), which return uninitialized memory. Fixed in 1.114.3 and 1.115.0.

Published Feb 4, 2026 · Analysis Nov 1, 2026

What an attacker can do

Node's Buffer.allocUnsafe() and allocUnsafeSlow() skip zero-filling, so a new buffer can contain whatever the process held before. In the n8n task runner, workflow code could call both functions. The leftover bytes may include data from earlier requests and tasks, secrets and tokens from the same Node.js process.

The attacker needs an n8n account that can run code, because only authenticated users reach the task runner. Two conditions must both hold: N8N_RUNNERS_ENABLED=true (default false) and the Code node enabled (default true). The CVSS vector marks a changed scope: code in a user's workflow reads memory that belongs to the wider process. On a shared n8n instance, a low-privilege editor could therefore pull credentials or data that other users' workflows handled. External mode, where task runners run in a separate sidecar container, keeps untrusted code out of the main process and reduces the risk, according to the advisory.

Who is affected

npm package n8n from 1.65.0 up to but not including 1.114.3, with task runners enabled (N8N_RUNNERS_ENABLED=true) and the Code node enabled. Deployments with task runners off, or with the Code node excluded, do not meet the stated conditions. Check the version and the setting:

npm ls n8n

For Docker, read the image tag, and look at the N8N_RUNNERS_ENABLED value in your environment or compose file.

n8n

Ecosystem
npm
Affected
>= 1.65.0, < 1.114.3
Fixed in
1.114.3
Check
npm ls n8n

How to fix it

Upgrade to n8n 1.114.3 or 1.115.0 or later. The patch removes unsafe Buffer functions from the task runner sandbox and routes allocations through Buffer.alloc, which zero-fills. In the fix commit, the Buffer global in the task runner is wrapped so allocUnsafe and allocUnsafeSlow return Buffer.alloc. The wrapper is skipped when the runner runs in insecure mode.

Workarounds if you cannot upgrade now:

  • Disable the Code node by adding n8n-nodes-base.code to NODES_EXCLUDE.
  • Run task runners in external mode, so untrusted code runs in a separate sidecar container instead of the main n8n process.

How to tell if you were hit

The sources give no log signature for this leak, since reading uninitialized memory leaves no trace. Review Code node contents across workflows for allocUnsafe or allocUnsafeSlow calls, and check who can create or edit workflows. If an instance on an affected version ran task runners with the Code node on and untrusted editors, assume secrets in process memory could have been read, and rotate credentials stored in n8n. Compare your NODES_EXCLUDE and N8N_RUNNERS_ENABLED settings against the conditions above.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

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 N8N_RUNNERS_ENABLED=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 NODES_EXCLUDE 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

Questions

Does CVE-2025-61917 need authentication?

Yes. Only authenticated users can run code through task runners. The CVSS vector requires low privileges.

Am I affected if task runners are off?

The advisory says an affected deployment needs both N8N_RUNNERS_ENABLED=true, which defaults to false, and the Code node enabled, which defaults to true.

What does external mode change?

Task runner code runs in a separate sidecar container, not inside the main n8n process. A leak from uninitialized memory then exposes the runner's memory, not n8n's. The advisory lists it as a hardening step, not a fix.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More n8n vulnerabilities

All n8n entries