CVE-2026-42231: n8n: prototype pollution → RCE via Git node SSH
GHSA-q5f4-99jv-pgg5UNKNOWNCISA: TRACK*A vulnerability in n8n's XML webhook parsing allows any authenticated user with workflow edit rights to pollute JavaScript's object prototype via a crafted XML body, then chain that pollution through n8n's built-in Git node to achieve full remote code execution on the n8n host. For organizations running n8n as an AI agent orchestration platform — where it holds API keys to OpenAI, Anthropic, databases, and internal services — a single compromised account can fully own the automation server and everything it touches. While EPSS sits at 0.27% with no public exploit yet, n8n's track record of 75 CVEs and a 6/10 OpenSSF score signal systemic security debt that makes future weaponization plausible. Patch immediately to ≥1.123.32 (v1 LTS) or ≥2.17.4/2.18.1 (v2), and audit which users hold workflow-edit permissions — restrict or disable Git node access where not operationally required.
What is the risk?
HIGH. The attack requires authenticated access, which limits opportunistic mass exploitation, but the authenticated threat model (malicious insider, phished employee, credential-stuffed exposed instance) is realistic for enterprise n8n deployments. The prototype pollution-to-SSH-RCE chain is technically sophisticated but well-documented in the advisory, lowering the skill floor for motivated actors. n8n's role as an AI agent hub with privileged outbound connectivity amplifies the blast radius well beyond the host itself. 75 prior CVEs in the same package and a moderate OpenSSF score indicate this is not an isolated incident.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| n8n | npm | < 1.123.32 | 1.123.32 |
Do you use n8n? You're affected.
How severe is it?
What should I do?
5 stepsPatch immediately: Upgrade n8n to ≥1.123.32 (v1 LTS) or ≥2.17.4/2.18.1 (v2).
Restrict permissions: Audit who holds workflow create/modify rights — apply least-privilege; revoke or limit access to the Git node if SSH operations are not required.
Network isolation: Block outbound SSH from the n8n container/process to non-approved hosts via egress firewall rules.
Detection: Monitor for anomalous SSH connections spawned by the n8n process, unexpected child processes under the n8n parent, or inbound webhook POST requests with XML content-type containing deeply nested or numeric-key XML structures.
Credential rotation: After patching, audit and rotate all API keys and credentials stored in n8n workflow configurations — assume they may have been accessible to an attacker who exploited this prior to patching.
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-42231?
A vulnerability in n8n's XML webhook parsing allows any authenticated user with workflow edit rights to pollute JavaScript's object prototype via a crafted XML body, then chain that pollution through n8n's built-in Git node to achieve full remote code execution on the n8n host. For organizations running n8n as an AI agent orchestration platform — where it holds API keys to OpenAI, Anthropic, databases, and internal services — a single compromised account can fully own the automation server and everything it touches. While EPSS sits at 0.27% with no public exploit yet, n8n's track record of 75 CVEs and a 6/10 OpenSSF score signal systemic security debt that makes future weaponization plausible. Patch immediately to ≥1.123.32 (v1 LTS) or ≥2.17.4/2.18.1 (v2), and audit which users hold workflow-edit permissions — restrict or disable Git node access where not operationally required.
Is CVE-2026-42231 actively exploited?
No confirmed active exploitation of CVE-2026-42231 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-42231?
1. Patch immediately: Upgrade n8n to ≥1.123.32 (v1 LTS) or ≥2.17.4/2.18.1 (v2). 2. Restrict permissions: Audit who holds workflow create/modify rights — apply least-privilege; revoke or limit access to the Git node if SSH operations are not required. 3. Network isolation: Block outbound SSH from the n8n container/process to non-approved hosts via egress firewall rules. 4. Detection: Monitor for anomalous SSH connections spawned by the n8n process, unexpected child processes under the n8n parent, or inbound webhook POST requests with XML content-type containing deeply nested or numeric-key XML structures. 5. Credential rotation: After patching, audit and rotate all API keys and credentials stored in n8n workflow configurations — assume they may have been accessible to an attacker who exploited this prior to patching.
What systems are affected by CVE-2026-42231?
This vulnerability affects the following AI/ML architecture patterns: agent frameworks, workflow automation pipelines, AI orchestration platforms, multi-tool AI agent deployments.
What is the CVSS score for CVE-2026-42231?
No CVSS score has been assigned yet.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001AI SoftwareAML.T0049Exploit Public-Facing ApplicationAML.T0053AI Agent Tool InvocationAML.T0081Modify AI Agent ConfigurationAML.T0083Credentials from AI Agent ConfigurationAML.T0112Machine CompromiseCompliance Controls Affected
What are the technical details?
Original Advisory
n8n is an open source workflow automation platform. Prior to versions 1.123.32, 2.17.4, and 2.18.1, a flaw in the xml2js library used to parse XML request bodies in n8n's webhook handler allowed prototype pollution via a crafted XML payload. An authenticated user with permission to create or modify workflows could exploit this to pollute the JavaScript object prototype and, by chaining the pollution with the Git node's SSH operations, achieve remote code execution on the n8n host. This issue has been patched in versions 1.123.32, 2.17.4, and 2.18.1.
Exploitation Scenario
An adversary with authenticated n8n access — via a phished employee, credential stuffing on an internet-exposed instance, or a malicious insider — creates a workflow containing a webhook trigger and a Git node. They send a crafted HTTP POST to the webhook endpoint with an XML body embedding prototype-polluting keys (e.g., keys resolving to `__proto__`) that xml2js parses without sanitization, injecting attacker-controlled values into Object.prototype. When the workflow executes and reaches the Git node, n8n's SSH client internals consume the now-polluted prototype properties, allowing the attacker to inject arbitrary commands into the SSH invocation. This yields RCE on the n8n host under the service account, from which the attacker extracts stored credentials for every connected AI API and internal service, establishes persistence, and pivots laterally.
Weaknesses (CWE)
CWE-1321Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')PrimaryCWE-1321Improperly Controlled Modification of Object Prototype AttributesPrimaryCWE-1321 — Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'): The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.
- [Implementation] By freezing the object prototype first (for example, Object.freeze(Object.prototype)), modification of the prototype becomes impossible.
- [Architecture and Design] By blocking modifications of attributes that resolve to object prototype, such as proto or prototype, this weakness can be mitigated.
Source: MITRE CWE corpus.
References
Timeline
Related Vulnerabilities
CVE-2026-3366310.0n8n: member role steals plaintext HTTP credentials
Same package: n8nCVE-2026-3366010.0TensorFlow: type confusion NPD in tensor conversion
Same package: n8nCVE-2026-2185810.0n8n: Input Validation flaw enables exploitation
Same package: n8nCVE-2026-275779.9n8n: Code Injection enables RCE
Same package: n8nCVE-2026-274949.9n8n: security flaw enables exploitation
Same package: n8n