GHSA-f2cp-m7mv-8jpv: Path Traversal
Impact
The Elasticsearch and ElasticSecurity nodes built REST endpoints by interpolating user-provided identifiers straight into the request path. A value containing path separators or dot segments changed which endpoint the request actually reached, so an operation intended for one document could hit another index or a cluster administration endpoint instead, under the stored Elasticsearch credential. The patch encodes each identifier as a single URL path segment and rejects values that normalise away.
Patches
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.
Workarounds
If upgrading is not immediately possible, administrators should consider the following temporary mitigations: - Restrict n8n instance access to fully trusted users only. - Disable the affected nodes by adding n8n-nodes-base.elasticsearch and n8n-nodes-base.elasticSecurity to the NODESEXCLUDE environment variable if they are not required. - Audit existing workflows that use these nodes and ensure that index and document identifier fields do not accept externally-controlled input.
These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/n8nto a version that resolves this vulnerability.Fixed in 2.37.7 - Upgrade
Upgrade
npm/n8nto a version that resolves this vulnerability.Fixed in 2.38.2 - Upgrade
Upgrade
npm/n8nto a version that resolves this vulnerability.Fixed in 1.123.76 - Upgrade
Upgrade
n8n-nodes-base.elasticsearch / n8n-nodes-base.elasticSecurityto a version that resolves this vulnerability.Fixed in 1.123.76 - Upgrade
Upgrade
n8n-nodes-base.elasticsearch / n8n-nodes-base.elasticSecurityto a version that resolves this vulnerability.Fixed in 2.37.7 - Upgrade
Upgrade
n8n-nodes-base.elasticsearch / n8n-nodes-base.elasticSecurityto a version that resolves this vulnerability.Fixed in 2.38.2 - Configuration
Disable the affected Elasticsearch and ElasticSecurity nodes by adding `n8n-nodes-base.elasticsearch` and `n8n-nodes-base.elasticSecurity` to the `NODES_EXCLUDE` environment variable if they are not required.
n8n (environment configuration) NODES_EXCLUDE = n8n-nodes-base.elasticsearch,n8n-nodes-base.elasticSecurity - Compensating control
Restrict the n8n instance access to fully trusted users only.
- Compensating control
Audit existing workflows that use these nodes and ensure that index and document identifier fields do not accept externally-controlled input.
Event History
Frequently Asked Questions
Who can exploit this issue in practice?
An attacker needs the ability to influence identifier values used by Elasticsearch or ElasticSecurity node operations, such as index or document identifiers. The affected request is made using the stored Elasticsearch credential, so the resulting access is bounded by that credential's permissions.
Are all n8n installations affected by default?
The issue affects workflows using the Elasticsearch or ElasticSecurity nodes where identifier fields can receive attacker-controlled values. Instances that do not use these nodes, or whose relevant identifier fields are not externally controlled, are not exposed through this path.
What can be done before an upgrade is available?
Restrict access to the n8n instance to fully trusted users. If the nodes are not needed, disable them with the NODES_EXCLUDE environment variable by adding n8n-nodes-base.elasticsearch and n8n-nodes-base.elasticSecurity; also audit existing workflows to ensure index and document identifiers do not accept externally controlled input.
How can administrators identify potentially affected workflows?
Review workflows that use the Elasticsearch or ElasticSecurity nodes and inspect index and document identifier fields. Workflows are potentially affected when those values can be supplied or influenced by external input, particularly if path separators or dot segments can be included.
Which releases contain the fix?
The fix is available in n8n versions 1.123.76, 2.37.7, and 2.38.2, and later versions.