CVE-2025-61917: N8n N8n's Unsafe Buffer Allocation Allows Vulnerability

HIGH
Advisory Identifier: GHSA-49mx-fj45-q3p6
CVSS 7.7
CWE-668 CWE-200
Published
Advisory Summary

CVE-2025-61917 is a HIGH (CVSS 7.7) n8n's unsafe buffer allocation allows vulnerability (CWE-668: Exposure of Resource to Wrong Sphere) affecting N8n libraries in the npm ecosystem. The issue involves n8n's unsafe buffer allocation allows in-process memory disclosure in task runner. Remediation is available by upgrading affected packages to version 1.114.3.

CVE-2025-61917 at a Glance

CVE Identifier CVE-2025-61917
GHSA Identifier GHSA-49mx-fj45-q3p6
Severity HIGH
CVSS v3.1 Base Score 7.7
CWE Classification CWE-668: Exposure of Resource to Wrong Sphere
Affected Product N8n
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2025-61917

To remediate this vulnerability, upgrade all affected N8n dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

n8n fixed: 1.114.3
npm install n8n@1.114.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls n8n

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2025-61917, inspect your project dependencies using npm:

npm ls n8n

Analyze the terminal output to locate any version of N8n in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.114.3), your application is affected.

Note: The npm ls n8n command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-668: Exposure of Resource to Wrong Sphere, where the product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. In N8n, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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](https://docs.n8n.io/hosting/configuration/task-runners/) for configuration details and required environment variables. ### Resources - Node.js documentation: [`Buffer.alloc()`](https://nodejs.org/docs/latest-v22.x/api/buffer.html#static-method-bufferallocsize-fill-encoding) vs [`Buffer.allocUnsafe()`](https://nodejs.org/docs/latest-v22.x/api/buffer.html#static-method-bufferallocunsafesize) — background on zero-filled vs uninitialized allocations - [n8n Documentation — Task Runners](https://docs.n8n.io/hosting/configuration/task-runners/) — external mode, setup guide, and environment configuration details - [n8n Documentation — Blocking nodes](https://docs.n8n.io/hosting/securing/blocking-nodes/) — how to globally disable specific nodes

CVE-2025-61917 Affected N8n Versions

1 component(s)
Fixed Versions:
1.114.3
Product / Package Ecosystem Affected Versions Fixed Version
n8n
npm
≥ 1.65.0
< 1.114.3
1.114.3

References

Frequently Asked Questions

What is CVE-2025-61917?
CVE-2025-61917 is a security vulnerability in N8n involving n8n's Unsafe Buffer Allocation Allows In-Process Memory Disclosure in Task Runner under CWE-668: Exposure of Resource to Wrong Sphere.
Which N8n versions are affected?
Affected versions include releases prior to 1.114.3 across affected packages: n8n.
What version fixes CVE-2025-61917?
Upgrading to 1.114.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is n8n affected?
Yes, n8n is affected in releases prior to 1.114.3. Upgrade your dependency to 1.114.3 or later.
What is the CVSS score of CVE-2025-61917?
CVE-2025-61917 has a CVSS v3.1 base score of 7.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2025-61917?
CVE-2025-61917 is classified under CWE-668: Exposure of Resource to Wrong Sphere (The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource.).
How can I check npm dependencies for CVE-2025-61917?
Run the dependency tree command: 'npm ls n8n'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-49mx-fj45-q3p6",
  "modified" : "2026-02-04T19:53:00Z",
  "published" : "2026-02-04T17:48:11Z",
  "aliases" : [ "CVE-2025-61917" ],
  "summary" : "n8n's Unsafe Buffer Allocation Allows In-Process Memory Disclosure in Task Runner",
  "details" : "### Impact\n\nThe 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.  \n\nOnly authenticated users are able to execute code through Task Runners.\n\nThis issue affected any deployment in which both of the following conditions were met:\n- Task Runners were enabled using `N8N_RUNNERS_ENABLED=true` (default: false)\n- Code Node was enabled (default: true)\n\n\n### Patches\n\nAccess to unsafe Buffer functions has been removed from the task runner sandbox. All buffer allocations are now zero-filled by default.\n\n- **Fixed in:** 1.114.3 & 1.115.0\n- **Action:** It is strongly recommended to upgrade to version ≥ 1.114.3 as soon as possible.\n\nChanges introduced in this patch include:\n- Routing all buffer allocations through `Buffer.alloc` (which zero-fills) operations where applicable  \n- Adding regression tests to ensure continued enforcement of safe allocation practices\n\n\n### Workarounds\n\nIf an immediate upgrade cannot be applied, the following hardening steps are recommended:\n\n- Disable the Code Node by adding `n8n-nodes-base.code` to the `NODES_EXCLUDE` environment variable  \n- 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.  \n  In external mode, a launcher manages Task Runner processes in a dedicated sidecar environment, separate from the primary n8n instance.  \n  See the [n8n documentation](https://docs.n8n.io/hosting/configuration/task-runners/) for configuration details and required environment variables.\n\n\n### Resources\n\n- Node.js documentation: [`Buffer.alloc()`](https://nodejs.org/docs/latest-v22.x/api/buffer.html#static-method-bufferallocsize-fill-encoding) vs [`Buffer.allocUnsafe()`](https://nodejs.org/docs/latest-v22.x/api/buffer.html#static-method-bufferallocunsafesize) — background on zero-filled vs uninitialized allocations  \n- [n8n Documentation — Task Runners](https://docs.n8n.io/hosting/configuration/task-runners/) — external mode, setup guide, and environment configuration details\n- [n8n Documentation — Blocking nodes](https://docs.n8n.io/hosting/securing/blocking-nodes/) — how to globally disable specific nodes",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "n8n"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.65.0"
      }, {
        "fixed" : "1.114.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/n8n-io/n8n/security/advisories/GHSA-49mx-fj45-q3p6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-61917"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/n8n-io/n8n/commit/2c4c2953199733c791f739a40879ae31ca129aba"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/n8n-io/n8n"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-668" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-02-04T17:48:11Z",
    "nvd_published_at" : "2026-02-04T17:16:08Z"
  }
}