Understanding the n8n Query Injection Vulnerability
A notable security issue has been identified in n8n, an open-source workflow automation platform. This vulnerability, known as a query injection, affects specific operations within the platform. If exploited, it could allow an attacker to read data from your connected databases that they shouldn’t be able to access. It’s important for users to understand this risk and take the necessary steps to secure their systems.
CVE Details
- Product: n8n
- Published Date: September 3, 2026
- Severity: Medium
- Status: Analyzed
Affected Products
This query injection vulnerability impacts n8n versions prior to 2.35.4 and versions in the 2.36.x series before 2.36.2. Specifically, the issue lies within the way Elasticsearch Document Get All and Google Cloud Firestore Document Query operations handle incoming data.
When these operations construct their JSON queries, they directly insert expression values into the query string. An attacker could craft a malicious input containing special characters like quotes or braces. This crafted input could trick the system into closing the intended data field early and introducing new, unauthorized query commands. The result is that an operation meant to look up a single document could be manipulated to read an entire collection of data, leading to unauthorized information disclosure.
Current Status
The vulnerability (CVE-2026-85167) has been thoroughly analyzed. This means security experts have reviewed the issue, understood its nature, and determined its potential impact. Details regarding the vulnerability and its fixes are publicly available to help users protect their installations.
Severity Level
The Common Vulnerability Scoring System (CVSS) assigns this vulnerability a base score of 6.3 out of 10, classifying it as Medium Severity. While not critical, a successful exploit could lead to a significant breach of data confidentiality. Attackers with low privileges and no user interaction can potentially access sensitive information from your Elasticsearch or Google Cloud Firestore databases.
Possible Solutions
To fully protect your n8n instance from this query injection vulnerability, the most effective solution is to update your software immediately:
- If you are using n8n versions earlier than 2.35.4, upgrade to n8n 2.35.4 or a later version.
- If you are using n8n 2.36.x versions earlier than 2.36.2, upgrade to n8n 2.36.2 or a later version.
If an immediate upgrade isn’t possible, consider these temporary mitigation steps:
- Limit access to your n8n instance strictly to users you fully trust.
- Carefully review any existing workflows that use the Elasticsearch or Google Cloud Firestore nodes. Ensure that no data coming from external or untrusted sources is directly used in the query fields of these nodes.
- Restrict network access to any webhook or trigger endpoints that feed data into the affected nodes’ query fields.
- If you do not require the Elasticsearch or Google Cloud Firestore nodes, disable them by adding
n8n-nodes-base.elasticsearchorn8n-nodes-base.googleFirebaseCloudFirestoreto yourNODES_EXCLUDEenvironment variable.
Remember, these workarounds are only short-term measures. Upgrading to the patched versions is crucial for complete protection.
References
https://github.com/n8n-io/n8n/security/advisories/GHSA-wxwj-8wv6-vpw2
https://www.vulncheck.com/advisories/n8n-before-2.36.2-query-injection-via-elasticsearch-firestore-nodes


