CVE-2026-21877: n8n: Code Injection enables RCE

CRITICAL NUCLEI TEMPLATE
Published January 8, 2026
CISO Take

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.

Risk Assessment

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.

Affected Systems

Package Ecosystem Vulnerable Range Patched
n8n npm No patch
186.5K OpenSSF 6.0 16 dependents Pushed 6d ago 40% patched ~3d to patch Full package profile →

Do you use n8n? You're affected.

Severity & Risk

CVSS 3.1
9.9 / 10
EPSS
14.1%
chance of exploitation in 30 days
Higher than 94% of all CVEs
Exploitation Status
Exploit Possible
Exploitation: LOW
Sophistication
Trivial
Exploitation Confidence
low
Nuclei detection template available
EPSS exploit prediction: 14%
Composite signal derived from CISA KEV, CISA SSVC, EPSS, trickest/cve, and Nuclei templates.

Attack Surface

AV AC PR UI S C I A
AV Network
AC Low
PR Low
UI None
S Changed
C High
I High
A High

Recommended Action

6 steps
  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).

CISA SSVC Assessment

Decision Track
Exploitation none
Automatable No
Technical Impact total

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Art. 15 - Accuracy, Robustness and Cybersecurity Art. 9 - Risk Management System Article 15 - Accuracy, robustness and cybersecurity Article 9 - Risk management system
ISO 42001
A.6.2 - AI system lifecycle management A.9.3 - AI system security A.9.4 - Information Security
NIST AI RMF
GOVERN-1.2 - Policies and procedures for AI risk management MANAGE 2.4 - Mechanisms for Incident Response MANAGE-2.4 - Incident response and recovery for AI systems MEASURE 2.5 - AI System Security Evaluation
OWASP LLM Top 10
LLM07 - Insecure Plugin Design LLM08 - Excessive Agency

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 14.14%.

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.

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Timeline

Published
January 8, 2026
Last Modified
January 20, 2026
First Seen
January 8, 2026

Scanner Template Available

A Nuclei vulnerability scanner template exists for this CVE. You can scan your infrastructure for this vulnerability immediately.

View template on GitHub
nuclei -t http/cves/2026/CVE-2026-21877.yaml -u https://target.example.com

Related Vulnerabilities