CVE-2026-21893

7.2 HIGH

📋 TL;DR

A command injection vulnerability in n8n's community package installation functionality allows authenticated administrators to execute arbitrary system commands on the host server. This affects n8n installations from version 0.187.0 to before 1.120.3. The vulnerability requires administrative access to exploit.

💻 Affected Systems

Products:
  • n8n
Versions: 0.187.0 to 1.120.2
Operating Systems: All platforms running n8n
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects installations with community package functionality enabled and requires administrative user access.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full server compromise allowing attackers to execute arbitrary commands, install malware, exfiltrate data, or pivot to other systems.

🟠

Likely Case

Privilege escalation leading to data theft, service disruption, or installation of backdoors by malicious insiders or compromised admin accounts.

🟢

If Mitigated

Limited impact due to proper access controls, monitoring, and network segmentation preventing lateral movement.

🌐 Internet-Facing: HIGH if admin interface is exposed to internet without strong authentication controls.
🏢 Internal Only: MEDIUM as it requires authenticated admin access, but insider threats or compromised credentials remain a concern.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authenticated administrative access to the n8n interface. The vulnerability is in the package installation feature.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.120.3

Vendor Advisory: https://github.com/n8n-io/n8n/security/advisories/GHSA-7c4h-vh2m-743m

Restart Required: Yes

Instructions:

1. Backup your n8n data and workflows. 2. Update n8n to version 1.120.3 or later using your package manager or deployment method. 3. Restart the n8n service. 4. Verify the update was successful.

🔧 Temporary Workarounds

Disable community package installation

all

Temporarily disable the vulnerable package installation functionality

Set N8N_COMMUNITY_PACKAGES_ENABLED=false in environment variables or configuration

Restrict admin access

all

Limit administrative access to only trusted users and implement strong authentication

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate n8n instances from critical systems
  • Enforce multi-factor authentication for all administrative accounts and monitor admin activity logs

🔍 How to Verify

Check if Vulnerable:

Check n8n version via web interface or API. If version is between 0.187.0 and 1.120.2 inclusive, the system is vulnerable.

Check Version:

Check n8n web interface settings or use API endpoint /rest/health

Verify Fix Applied:

Confirm n8n version is 1.120.3 or later and test that community package installation functions properly without command injection.

📡 Detection & Monitoring

Log Indicators:

  • Unusual package installation attempts
  • Suspicious command execution in n8n logs
  • Multiple failed authentication attempts followed by admin login

Network Indicators:

  • Unexpected outbound connections from n8n server
  • Unusual traffic patterns to/from n8n admin interface

SIEM Query:

source="n8n" AND (event="package_install" OR event="command_execution") | stats count by user, command

🔗 References

📤 Share & Export