Listen to this Post
CVE-2026-86079 is a path injection vulnerability affecting n8n, an open source workflow automation platform. The flaw exists in the Elasticsearch and ElasticSecurity nodes, which are part of the n8n-nodes-base package. These nodes are designed to allow n8n workflows to interact with Elasticsearch clusters, performing operations such as searching, indexing, and retrieving documents. The vulnerability arises because the nodes construct REST API request paths by directly interpolating user-provided identifiers—specifically index names and document IDs—without proper encoding or sanitization. The affected code is located in packages/nodes-base/nodes/Elastic/Elasticsearch/GenericFunctions.ts, where the function that builds the URL path fails to encode each identifier as a single URL path segment, a process that should use a toPathSegment routine. Because of this omission, an attacker who can control the input to these nodes can inject path separators (like forward slashes) or dot segments (such as “../”) into the identifier. When the HTTP client processes the crafted request, the injected characters are interpreted as structural parts of the URL rather than as literal data. Consequently, the request is redirected away from the intended Elasticsearch index or document endpoint and may instead reach a different index within the same cluster, or even a cluster administration endpoint. All of this occurs under the stored Elasticsearch credential that the n8n node uses to authenticate, meaning the attacker inherits whatever privileges that credential possesses. This behavior is classified as CWE-22, Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal. The root cause is a failure to validate and encode input properly, which allows the URL path structure to be manipulated. In practical terms, if a workflow author writes a workflow that accepts an index name from an external source—such as a webhook payload or a user form—an attacker could supply a value like “../_cluster/health” to access cluster administration APIs, or “other-index/_search” to query an unintended index. The vulnerability does not require authentication bypass; it leverages the legitimate credentials already configured in the n8n node. The impact is severe because it can lead to unauthorized data access, data exfiltration, or configuration manipulation within the Elasticsearch environment. An attacker could read sensitive documents, delete data, or alter index mappings depending on the permissions of the stored credential. The CVSS v4.0 base score is 6.3, rated Medium, with a vector of CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:N/SA:N, indicating a network-exploitable issue requiring low privileges and no user interaction, with high confidentiality impact on subsequent systems. The vulnerability was published on September 8, 2026, and affects n8n versions before 1.123.76, 2.37.7, and 2.38.2. The patch encodes each identifier as a single URL path segment and rejects values that normalize away from the intended path.
DailyCVE Form:
Platform: n8n
Version: <1.123.76
Vulnerability: Path Injection
Severity: Medium
date: 2026-09-08
Prediction: 2026-09-15
What Undercode Say:
The following commands and code snippets illustrate the technical mechanics of CVE-2026-86079.
Reviewing the vulnerable request construction in the n8n source code:
cat packages/nodes-base/nodes/Elastic/Elasticsearch/GenericFunctions.ts
Examining the function responsible for building the Elasticsearch REST path:
// Vulnerable pattern: identifier interpolated directly
const endpoint = <code>/${indexName}/${documentId}</code>;
Simulating a malicious index name that escapes the intended path:
Normal request curl -X GET "http://elasticsearch:9200/my-index/_doc/1" -u "user:pass" Crafted request using path traversal curl -X GET "http://elasticsearch:9200/../_cluster/health" -u "user:pass"
Testing the injected identifier within an n8n workflow expression:
// Expression input that triggers the vulnerability
{{ $json["index_name"] }}
// Attacker supplies: "../_cat/indices"
Encoding the identifier correctly as a single path segment after the patch:
// Patched pattern: encodeURIComponent applied
const endpoint = <code>/${encodeURIComponent(indexName)}/${encodeURIComponent(documentId)}</code>;
Exploit: (Educational Purposes!)
The exploitation of CVE-2026-86079 relies on the attacker’s ability to influence the index name or document ID that is passed to an Elasticsearch or ElasticSecurity node within an n8n workflow. This is possible when a workflow is designed to accept such identifiers from an external, untrusted source—for example, a webhook trigger, a form submission, or an API call that feeds into the node. The attacker does not need to compromise the n8n instance itself; they only need to control the data that flows into the vulnerable node. A typical attack begins with the attacker identifying a workflow that uses the Elasticsearch node with a dynamic index or document identifier. The attacker then crafts a value that includes path traversal sequences or additional path segments. For instance, instead of a legitimate index name like “customer-data”, the attacker submits “../_cluster/state”. When the n8n node constructs the request, it concatenates this value into the URL, resulting in a path like “http://elasticsearch-host:9200/../_cluster/state”. The Elasticsearch HTTP server normalizes this path, resolving the “../” segment and effectively requesting “/_cluster/state”, which is a cluster administration endpoint. Because the request is authenticated with the stored Elasticsearch credentials, the attacker can retrieve cluster state information, potentially including configuration details, node information, and index metadata. The attacker could also target other indices by supplying a value like “other-index/_search”, which would cause the node to perform a search operation on an index that the workflow was not intended to access. In more severe cases, if the stored credential has write permissions, the attacker might manipulate data by injecting paths that lead to document indexing or deletion endpoints. The attack is stealthy because it uses the legitimate authentication mechanism and appears as normal traffic to the Elasticsearch server. The only anomalous element is the unexpected path in the request, which may not be logged or monitored in typical deployments. This vulnerability is particularly dangerous in multi-tenant n8n environments where different teams or customers share the same Elasticsearch cluster but expect logical isolation between their data. An attacker from one tenant could use a workflow that they control to access another tenant’s indices, breaking the isolation boundary.
Protection: from this CVE
The primary and most effective protection against CVE-2026-86079 is to upgrade n8n to a patched version. The issue has been fixed in n8n versions 1.123.76, 2.37.7, and 2.38.2. Users should upgrade to one of these versions or later to remediate the vulnerability. If an immediate upgrade is not possible, administrators should consider the following temporary mitigations. First, restrict access to the n8n instance to fully trusted users only. This reduces the attack surface by limiting who can create or modify workflows that use the affected nodes. Second, if the Elasticsearch and ElasticSecurity nodes are not required for the organization’s workflows, disable them by adding `n8n-nodes-base.elasticsearch` and `n8n-nodes-base.elasticSecurity` to the `NODES_EXCLUDE` environment variable. Third, audit existing workflows that use these nodes and ensure that the index and document identifier fields do not accept externally controlled input. If a workflow must accept dynamic identifiers, implement strict input validation at the workflow level, allowing only alphanumeric characters and a limited set of safe symbols that are known not to include path separators or dot segments. These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures until the upgrade can be applied. After upgrading, organizations should also review their Elasticsearch cluster’s credential permissions to ensure that the n8n integration user follows the principle of least privilege, limiting the potential impact of any future injection flaws.
Impact:
The impact of CVE-2026-86079 is significant because it allows an attacker to manipulate the target of Elasticsearch REST requests made by n8n workflows. The vulnerability enables path injection, which can redirect requests to unintended indices or cluster administration endpoints. This leads to unauthorized data access, where an attacker can read sensitive documents from indices that were not intended to be accessible through the workflow. In environments where the stored Elasticsearch credential has write permissions, the attacker could also modify or delete data, compromising data integrity. The flaw also exposes cluster administration APIs, which could allow an attacker to retrieve cluster state information, node details, and index metadata, potentially facilitating further attacks. The CVSS v4.0 score of 6.3 reflects a Medium severity, with high confidentiality impact on subsequent systems, but no direct availability or integrity impact on the vulnerable component itself. The vulnerability is network-exploitable, requires low privileges, and does not require user interaction. The EPSS score is 0.32%, indicating a very low probability of exploitation in the next 30 days, but the limited exploitation activity observed suggests that close monitoring and planned remediation are recommended. The primary risk is to data confidentiality and the integrity of the Elasticsearch environment, particularly in multi-tenant deployments where logical isolation between tenants may be bypassed. Organizations should treat this vulnerability with appropriate urgency, prioritizing the upgrade to patched versions to eliminate the risk.
🎯Let’s Practice Exploiting & Learn Patching For Free:
🎓 Live Courses & Certifications:
Join Undercode Academy for Verified Certifications
🚀 Request a Custom Project:
Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands
Sources:
Reported By: github.com
Extra Source Hub:
Undercode

