GHSA-365g-vjw2-grx8: n8n Execute Command Node Allows Authenticated Vulnerability

HIGH
CVSS 8.8
CWE-78
Published
Advisory Summary

GHSA-365g-vjw2-grx8 is a HIGH (CVSS 8.8) execute command node allows authenticated vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting n8n libraries in the npm ecosystem. The issue involves execute command node allows authenticated users to run arbitrary commands on host. Remediation is available in the latest vendor maintenance releases.

GHSA-365g-vjw2-grx8 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-365g-vjw2-grx8
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product n8n
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.8

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:U/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 Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix GHSA-365g-vjw2-grx8

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-nodes-base fixed: Latest secure release
npm install n8n-nodes-base@Latest secure release
n8n fixed: Latest secure release
npm install n8n@Latest secure release
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-nodes-base

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-365g-vjw2-grx8, inspect your project dependencies using npm:

npm ls n8n-nodes-base

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 the patched release), your application is affected.

Note: The npm ls n8n-nodes-base 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-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. 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 `Execute Command` node in n8n allows execution of arbitrary commands on the host system where n8n runs. While this functionality is intended for advanced automation and can be useful in certain workflows, it poses a security risk if all users with access to the n8n instance are not fully trusted. An attacker—either a malicious user or someone who has compromised a legitimate user account—could exploit this node to run arbitrary commands on the host machine, potentially leading to data exfiltration, service disruption, or full system compromise. This vulnerability affects all n8n deployments where: - The `Execute Command` node is enabled, and - Not all user accounts are strictly controlled and trusted. n8n.cloud is **not** impacted. ### Patches No code changes have been made to alter the behavior of the `Execute Command` node. The recommended mitigation is to disable the node by default in environments where it is not explicitly required. Future n8n versions may change the default availability of this node. ### Workarounds Administrators can disable the `Execute Command` node by setting the following environment variable before starting n8n: ```bash export NODES_EXCLUDE: "[\"n8n-nodes-base.executeCommand\"]" ``` ### References n8n docs: [Execute Command](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.executecommand/) n8n docs: [Blocking nodes](https://docs.n8n.io/hosting/securing/blocking-nodes/)

GHSA-365g-vjw2-grx8 Affected n8n Versions

2 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
n8n-nodes-base
npm
≤ 1.113.0
n8n
npm
≤ 1.114.4

References

Frequently Asked Questions

What is GHSA-365g-vjw2-grx8?
GHSA-365g-vjw2-grx8 is a security vulnerability in n8n involving Execute Command Node Allows Authenticated Users to Run Arbitrary Commands on Host under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which n8n versions are affected?
Affected versions include releases prior to current release patches across affected packages: n8n-nodes-base, n8n.
What version fixes GHSA-365g-vjw2-grx8?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is n8n-nodes-base affected?
Yes, n8n-nodes-base is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
Is n8n affected?
Yes, n8n is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of GHSA-365g-vjw2-grx8?
GHSA-365g-vjw2-grx8 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with GHSA-365g-vjw2-grx8?
GHSA-365g-vjw2-grx8 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check npm dependencies for GHSA-365g-vjw2-grx8?
Run the dependency tree command: 'npm ls n8n-nodes-base'. 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-365g-vjw2-grx8",
  "modified" : "2025-10-09T15:27:00Z",
  "published" : "2025-10-09T15:26:59Z",
  "aliases" : [ ],
  "summary" : "n8n: Execute Command Node Allows Authenticated Users to Run Arbitrary Commands on Host",
  "details" : "### Impact\n\nThe `Execute Command` node in n8n allows execution of arbitrary commands on the host system where n8n runs. While this functionality is intended for advanced automation and can be useful in certain workflows, it poses a security risk if all users with access to the n8n instance are not fully trusted.\n\nAn attacker—either a malicious user or someone who has compromised a legitimate user account—could exploit this node to run arbitrary commands on the host machine, potentially leading to data exfiltration, service disruption, or full system compromise.\n\nThis vulnerability affects all n8n deployments where:\n\n- The `Execute Command` node is enabled, and\n- Not all user accounts are strictly controlled and trusted.\n\nn8n.cloud is **not** impacted.\n\n\n### Patches\nNo code changes have been made to alter the behavior of the `Execute Command` node. The recommended mitigation is to disable the node by default in environments where it is not explicitly required.\n\nFuture n8n versions may change the default availability of this node.\n\n### Workarounds\nAdministrators can disable the `Execute Command` node by setting the following environment variable before starting n8n:\n\n```bash\nexport NODES_EXCLUDE: \"[\\\"n8n-nodes-base.executeCommand\\\"]\"\n```\n\n### References\nn8n docs: [Execute Command](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.executecommand/)\nn8n docs: [Blocking 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:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "n8n-nodes-base"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.113.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "n8n"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.114.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/n8n-io/n8n/security/advisories/GHSA-365g-vjw2-grx8"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/n8n-io/n8n"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-10-09T15:26:59Z",
    "nvd_published_at" : null
  }
}