mediumAgent ThreatTool Misuse

n8n Elasticsearch/ElasticSecurity Node Path Injection via Unencoded Identifiers

First seen Sep 13, 2026 · Updated Sep 13, 2026

n8npath-traversalelasticsearchworkflow-automationcredential-abuserest-api-injectionASI04 · Agentic Supply ChainSurface: Tool LayerPropagation: Single Hop

The n8n Elasticsearch and ElasticSecurity nodes failed to properly encode user-supplied index or document identifiers before inserting them into REST API request paths. This allowed a crafted identifier to redirect requests to unintended endpoints, including cluster administration functions, all under the stored Elasticsearch credential. It has been patched in recent n8n releases.

Technical Analysis

The nodes constructed Elasticsearch REST endpoint URLs by directly interpolating user- or workflow-provided identifiers (index/document names) into the path without URL-encoding or normalization checks. An identifier containing path separators or dot-segment sequences (e.g. '../') could cause the resulting request to resolve to a different index or to a cluster-level administrative endpoint rather than the intended document path. Because these nodes act as tool-layer connectors executing under a stored, often highly privileged Elasticsearch credential, this misdirection effectively grants an attacker-controlled input the ability to escalate scope from document-level operations to cluster administration actions. The entry point is any workflow field that accepts externally influenced index/document identifiers (e.g., from webhook input, API responses, or chained agent/tool output), making this a classic confused-deputy pattern within an automation/agent-tool integration.

Affected Systems

n8n

Detection Signatures

  • Workflow logs showing Elasticsearch/ElasticSecurity node requests with path segments containing '../', '..%2F', or unencoded '/' in index/document identifier fields
  • Unexpected Elasticsearch API calls to cluster admin endpoints (e.g., _cluster, _cat) originating from document-level node operations
  • Identifier fields in n8n workflows populated from external/untrusted input (webhooks, HTTP responses, user forms) without sanitization
  • Requests reaching indices other than those explicitly configured in the workflow

Remediation Steps

  1. 1

    Upgrade n8n

    Update to n8n 1.123.76, 2.37.7, 2.38.2, or later, which encode identifiers as single URL path segments and reject values that normalize away path traversal sequences.

  2. 2

    Restrict instance access

    Limit n8n instance and workflow editing access to fully trusted users until upgraded.

  3. 3

    Disable affected nodes if unused

    Add n8n-nodes-base.elasticsearch and n8n-nodes-base.elasticSecurity to the NODES_EXCLUDE environment variable if these integrations are not required.

  4. 4

    Audit workflows for untrusted identifier input

    Review existing workflows using these nodes to ensure index and document identifier fields do not derive from externally-controlled or unsanitized input.

  5. 5

    Apply least-privilege credentials

    Scope Elasticsearch credentials used by n8n to the minimum required indices/actions to limit blast radius from any path manipulation.

CVE / Advisory IDs

CVE-2026-86079GHSA-f2cp-m7mv-8jpv

Industries Most Exposed

TechnologyIT operations/DevOpsSaaSany industry using n8n workflow automation with Elasticsearch integrations

Sources

Respond to this threat

Pro subscribers get a full AI-generated incident-response playbook for this threat — detection, containment, eradication, and recovery steps — plus an unlimited AI Threat Advisor for questions about your environment.