CVE-2026-21877
CRITICALCVE-2026-21877 is a critical (9.9) authenticated RCE in n8n, the workflow automation platform widely deployed as an AI agent orchestration layer. Any n8n instance with untrusted users—including n8n Cloud—is at risk: patch immediately to 1.121.3. If patching is delayed, disable the Git node and audit authenticated access now, as low-privilege accounts are sufficient to achieve full system compromise and pivot to every connected AI service.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| n8n | npm | — | No patch |
Do you use n8n? You're affected.
Severity & Risk
Recommended Action
- 1. PATCH IMMEDIATELY: Upgrade n8n to version 1.121.3 or later—this is the only complete remediation. 2. INTERIM WORKAROUND: Disable the Git node in n8n node settings if immediate patching is not possible. 3. ACCESS CONTROL: Audit all n8n user accounts; remove or demote untrusted or unnecessary accounts. Enforce least-privilege—restrict who can create or modify workflows. 4. ROTATE CREDENTIALS: After patching, rotate all API keys, database passwords, and secrets stored in n8n credentials; assume compromise if any untrusted users had authenticated access. 5. DETECTION: Review n8n execution logs for unexpected workflow runs, anomalous Git node activity, or outbound connections to unknown hosts. Audit workflow change history for modifications by non-admin accounts. 6. NETWORK HARDENING: Place internet-facing n8n instances behind VPN or IP allowlist until patching is complete. Monitor for reverse shell indicators (unexpected outbound TCP on non-standard ports from the n8n process).
Classification
Compliance Impact
This CVE is relevant to:
Technical Details
NVD Description
n8n is an open source workflow automation platform. In versions 0.121.2 and below, an authenticated attacker may be able to execute malicious code using the n8n service. This could result in full compromise and can impact both self-hosted and n8n Cloud instances. This issue is fixed in version 1.121.3. Administrators can reduce exposure by disabling the Git node and limiting access for untrusted users, but upgrading to the latest version is recommended.
Exploitation Scenario
An adversary targeting an organization's AI infrastructure obtains low-privilege access to n8n—via credential stuffing against the login page, a compromised employee account, or a trial account on n8n Cloud. The attacker creates a new workflow containing a Git node configured to clone a malicious repository. The repository contains a crafted payload exploiting CWE-434 (unrestricted file upload) that triggers CWE-94 (code injection) when the Git node processes the repository contents, executing arbitrary code in the n8n service process. The attacker then dumps all n8n stored credentials (OpenAI/Anthropic API keys, database passwords, webhook secrets), establishes persistence via a reverse shell, pivots to connected AI services and internal databases, and modifies existing agent workflows to introduce data exfiltration backdoors affecting every document processed by those pipelines going forward.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H