CVE-2026-21877: N8n Remote Code Execution Vulnerability

CRITICAL
Advisory Identifier: GHSA-v364-rw7m-3263
CVSS 9.9
CWE-434
Published
Advisory Summary

CVE-2026-21877 is a CRITICAL (CVSS 9.9) remote code execution vulnerability (CWE-434: Unrestricted Upload of File with Dangerous Type) affecting N8n libraries in the npm ecosystem. The issue involves n8n vulnerable to rce via arbitrary file write. Remediation is available by upgrading affected packages to version 1.121.3.

CVE-2026-21877 at a Glance

CVE Identifier CVE-2026-21877
GHSA Identifier GHSA-v364-rw7m-3263
Severity CRITICAL
CVSS v3.1 Base Score 9.9
CWE Classification CWE-434: Unrestricted Upload of File with Dangerous Type
Affected Product N8n
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 9.9

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:H/A:H).

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 High (I:H)
Availability High (A:H)

How to Fix CVE-2026-21877

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.121.3
npm install n8n@1.121.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-2026-21877, 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.121.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-434: Unrestricted Upload of File with Dangerous Type, where the product allows the upload or transfer of dangerous file types that are automatically processed within its environment. 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 n8n is affected by an authenticated Remote Code Execution (RCE) vulnerability. Under certain conditions, an authenticated user may be able to cause untrusted code to be executed by the n8n service. This could result in full compromise of the affected instance. Both self-hosted and n8n Cloud instances are impacted. ### Patches The issue has been resolved in n8n version 1.121.3. Users are advised to upgrade to this version or later to fully address the vulnerability. ### Workarounds If upgrading is not immediately possible, administrators can reduce exposure by disabling the Git node and limiting access for untrusted users. ### References - n8n documentation: [Blocking access to nodes](https://docs.n8n.io/hosting/securing/blocking-nodes/)

CVE-2026-21877 Affected N8n Versions

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

References

Frequently Asked Questions

What is CVE-2026-21877?
CVE-2026-21877 is a security vulnerability in N8n involving n8n Vulnerable to RCE via Arbitrary File Write under CWE-434: Unrestricted Upload of File with Dangerous Type.
Which N8n versions are affected?
Affected versions include releases prior to 1.121.3 across affected packages: n8n.
What version fixes CVE-2026-21877?
Upgrading to 1.121.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.121.3. Upgrade your dependency to 1.121.3 or later.
What is the CVSS score of CVE-2026-21877?
CVE-2026-21877 has a CVSS v3.1 base score of 9.9 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2026-21877?
CVE-2026-21877 is classified under CWE-434: Unrestricted Upload of File with Dangerous Type (The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.).
How can I check npm dependencies for CVE-2026-21877?
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-v364-rw7m-3263",
  "modified" : "2026-01-06T17:48:24Z",
  "published" : "2026-01-06T17:48:24Z",
  "aliases" : [ "CVE-2026-21877" ],
  "summary" : "n8n Vulnerable to RCE via Arbitrary File Write",
  "details" : "### Impact\nn8n is affected by an authenticated Remote Code Execution (RCE) vulnerability.\n\nUnder certain conditions, an authenticated user may be able to cause untrusted code to be executed by the n8n service. This could result in full compromise of the affected instance.\n\nBoth self-hosted and n8n Cloud instances are impacted.\n\n### Patches\nThe issue has been resolved in n8n version 1.121.3.\n\nUsers are advised to upgrade to this version or later to fully address the vulnerability.\n\n### Workarounds\nIf upgrading is not immediately possible, administrators can reduce exposure by disabling the Git node and limiting access for untrusted users.\n\n### References\n- n8n documentation: [Blocking access to nodes](https://docs.n8n.io/hosting/securing/blocking-nodes/)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "n8n"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.123.0"
      }, {
        "fixed" : "1.121.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/n8n-io/n8n/security/advisories/GHSA-v364-rw7m-3263"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/n8n-io/n8n"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-434" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-01-06T17:48:24Z",
    "nvd_published_at" : null
  }
}