CVE-2026-21893: N8n N8n Vulnerable To Command Injection Vulnerability
CRITICALCVE-2026-21893 is a CRITICAL n8n vulnerable to command injection 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 n8n vulnerable to command injection in community package installation. Remediation is available by upgrading affected packages to version 1.120.3.
CVE-2026-21893 at a Glance
How to Fix CVE-2026-21893
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.
npm install n8n@1.120.3
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-21893, 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.120.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-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
CVE-2026-21893 Affected N8n Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
n8n
|
npm |
≥ 0.187.0
< 1.120.3
|
1.120.3
|
References
Frequently Asked Questions
What is CVE-2026-21893?
Which N8n versions are affected?
What version fixes CVE-2026-21893?
Is n8n affected?
What CWE is associated with CVE-2026-21893?
How can I check npm dependencies for CVE-2026-21893?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7c4h-vh2m-743m",
"modified" : "2026-02-04T19:53:12Z",
"published" : "2026-02-04T17:49:38Z",
"aliases" : [ "CVE-2026-21893" ],
"summary" : "n8n Vulnerable to Command Injection in Community Package Installation",
"details" : "### Impact\nA Command Injection vulnerability was identified in n8n’s community package installation functionality. The issue allowed authenticated users with administrative permissions to execute arbitrary system commands on the n8n host under specific conditions.\n\n**Important context**\n\n- Exploitation requires _administrative_ access to the n8n instance.\n- The affected functionality is restricted to trusted users who are already permitted to install third-party community packages.\n- No unauthenticated or low-privilege exploitation is possible.\n- There is no evidence of exploitation in the wild.\n\nBecause administrative users can already extend n8n with custom or community code, the vulnerability does not meaningfully expand the threat model beyond existing administrator capabilities. However, it represents a violation of secure coding practices and has therefore been addressed.\n\n### Patches\nUsers are advised to upgrade to n8n version 1.120.3 or later, which fully resolves the issue.\n\nAs a general security best practice, n8n instance owners should ensure that:\n- Administrative access is limited to trusted users only.\n- Community packages are installed only from trusted sources.\n- Instances are kept up to date with the latest security releases.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "n8n"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.187.0"
}, {
"fixed" : "1.120.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/n8n-io/n8n/security/advisories/GHSA-7c4h-vh2m-743m"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-21893"
}, {
"type" : "WEB",
"url" : "https://github.com/n8n-io/n8n/commit/ae0669a736cc496beeb296e115267862727ae838"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/n8n-io/n8n"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20", "CWE-78" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-04T17:49:38Z",
"nvd_published_at" : "2026-02-04T18:16:08Z"
}
}