CVE-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.
What is the risk?
Risk is CRITICAL. CVSS 9.9 with Changed scope means compromise extends beyond n8n itself to all connected services—LLM APIs, databases, internal systems. Attack complexity is Low and only low-privilege authentication is required with no user interaction. n8n is pervasive in AI agent pipelines, acting as the orchestration layer between LLMs, APIs, and data sources. A compromised instance typically holds API keys for OpenAI, Anthropic, and Azure OpenAI, database credentials, webhook secrets, and access to internal infrastructure, making the blast radius extremely wide. Cloud instances are explicitly confirmed affected, meaning SaaS customers are not protected by network-level mitigations alone.
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| n8n | npm | — | No patch |
Do you use n8n? You're affected.
How severe is it?
What is the attack surface?
What should I do?
6 steps-
PATCH IMMEDIATELY
Upgrade n8n to version 1.121.3 or later—this is the only complete remediation.
-
INTERIM WORKAROUND
Disable the Git node in n8n node settings if immediate patching is not possible.
-
ACCESS CONTROL
Audit all n8n user accounts; remove or demote untrusted or unnecessary accounts. Enforce least-privilege—restrict who can create or modify workflows.
-
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.
-
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.
-
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).
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-21877?
CVE-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.
Is CVE-2026-21877 actively exploited?
No confirmed active exploitation of CVE-2026-21877 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-21877?
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).
What systems are affected by CVE-2026-21877?
This vulnerability affects the following AI/ML architecture patterns: agent frameworks, workflow automation pipelines, RAG pipelines, LLM integration layers, CI/CD pipelines with AI components.
What is the CVSS score for CVE-2026-21877?
CVE-2026-21877 has a CVSS v3.1 base score of 9.9 (CRITICAL). The EPSS exploitation probability is 5.26%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0012 Valid Accounts AML.T0049 Exploit Public-Facing Application AML.T0050 Command and Scripting Interpreter AML.T0053 AI Agent Tool Invocation AML.T0072 Reverse Shell AML.T0081 Modify AI Agent Configuration AML.T0083 Credentials from AI Agent Configuration AML.T0105 Escape to Host AML.T0108 AI Agent Compliance Controls Affected
What are the technical details?
Original Advisory
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)
CWE-434 Unrestricted Upload of File with Dangerous Type
Primary
CWE-94 Improper Control of Generation of Code ('Code Injection')
Primary
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.
- [Architecture and Design] Generate a new, unique filename for an uploaded file instead of using the user-supplied filename, so that no external input is used at all.[REF-422] [REF-423]
- [Architecture and Design] When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H References
Timeline
Scanner Template Available
A Nuclei vulnerability scanner template exists for this CVE. You can scan your infrastructure for this vulnerability immediately.
View template on GitHubnuclei -t http/cves/2026/CVE-2026-21877.yaml -u https://target.example.com Related Vulnerabilities
CVE-2026-33663 10.0 n8n: member role steals plaintext HTTP credentials
Same package: n8n CVE-2026-54309 10.0 n8n: MCP browser auth bypass allows full browser takeover
Same package: n8n CVE-2026-21858 10.0 n8n: Input Validation flaw enables exploitation
Same package: n8n CVE-2026-33660 10.0 TensorFlow: type confusion NPD in tensor conversion
Same package: n8n CVE-2026-27577 9.9 n8n: Code Injection enables RCE
Same package: n8n