CVE-2026-110840: n8n: SQL injection in MSSQL node v1 Query field
HIGHn8n's Microsoft SQL node (version 1) inserts Query field expression values straight into SQL text without parameterisation. Any workflow that maps untrusted input, such as webhook fields, into that field lets an unauthenticated caller run arbitrary SQL with the privileges of the stored database credential. n8n is widely used as an AI agent and automation orchestrator, so these workflows often sit in front of production databases. Exploitation likelihood is unquantified: no CVSS or EPSS score has been assigned, the CVE is not in CISA KEV, and no public exploit or Nuclei template exists. That is only the state at publication on 2026-10-14, and SQL injection through a public webhook is trivial to weaponise once details circulate. Upgrade to n8n 2.41.4 or 2.42.1 or later, and until then inventory workflows that use MSSQL node v1 with webhook-fed expressions and restrict the credential's database permissions.
What is the risk?
Risk should be treated as high pending an official score. The attack needs no authentication when the workflow exposes a public webhook, uses standard SQL injection (CWE-89), and can reach the full privileges of the stored database credential. It applies only where a workflow binds untrusted input to the Query field of MSSQL node version 1, which limits the affected population. No active exploitation, KEV listing, public exploit or scanner template is known at publication. Confidence in these facts is MEDIUM because there is no CVSS or EPSS data yet and the details come from the vendor advisory and VulnCheck.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| n8n | npm | — | No patch |
Do you use n8n? You're affected.
How severe is it?
What should I do?
7 stepsUpgrade n8n to 2.41.4 or later on the 2.41 line, or to 2.42.1 or later on the 2.42 line.
Until patched, find workflows using the Microsoft SQL node version 1 and check whether the Query field contains expressions fed by webhooks, forms, chat triggers or LLM output.
Migrate those nodes to a newer node version or to parameterised queries, and validate or sanitise inputs upstream.
Reduce the stored SQL credential to least privilege (read-only where possible, no xp_cmdshell or admin roles).
Require authentication on webhook endpoints and restrict network exposure of the n8n instance.
Detect abuse by reviewing SQL Server logs and n8n execution history for unusual queries, UNION or stacked statements, and unexpected webhook payloads.
Rotate the database credentials if exploitation is suspected.
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-110840?
n8n's Microsoft SQL node (version 1) inserts Query field expression values straight into SQL text without parameterisation. Any workflow that maps untrusted input, such as webhook fields, into that field lets an unauthenticated caller run arbitrary SQL with the privileges of the stored database credential. n8n is widely used as an AI agent and automation orchestrator, so these workflows often sit in front of production databases. Exploitation likelihood is unquantified: no CVSS or EPSS score has been assigned, the CVE is not in CISA KEV, and no public exploit or Nuclei template exists. That is only the state at publication on 2026-10-14, and SQL injection through a public webhook is trivial to weaponise once details circulate. Upgrade to n8n 2.41.4 or 2.42.1 or later, and until then inventory workflows that use MSSQL node v1 with webhook-fed expressions and restrict the credential's database permissions.
Is CVE-2026-110840 actively exploited?
No confirmed active exploitation of CVE-2026-110840 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-110840?
1. Upgrade n8n to 2.41.4 or later on the 2.41 line, or to 2.42.1 or later on the 2.42 line. 2. Until patched, find workflows using the Microsoft SQL node version 1 and check whether the Query field contains expressions fed by webhooks, forms, chat triggers or LLM output. 3. Migrate those nodes to a newer node version or to parameterised queries, and validate or sanitise inputs upstream. 4. Reduce the stored SQL credential to least privilege (read-only where possible, no xp_cmdshell or admin roles). 5. Require authentication on webhook endpoints and restrict network exposure of the n8n instance. 6. Detect abuse by reviewing SQL Server logs and n8n execution history for unusual queries, UNION or stacked statements, and unexpected webhook payloads. 7. Rotate the database credentials if exploitation is suspected.
What systems are affected by CVE-2026-110840?
This vulnerability affects the following AI/ML architecture patterns: Agent frameworks, Workflow automation pipelines, RAG pipelines, LLM tool-calling backends.
What is the CVSS score for CVE-2026-110840?
No CVSS score has been assigned yet.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0036Data from Information RepositoriesAML.T0049Exploit Public-Facing ApplicationAML.T0053AI Agent Tool InvocationCompliance Controls Affected
What are the technical details?
Original Advisory
n8n before 2.41.4 and 2.42.x before 2.42.1 contains an SQL injection vulnerability in version 1 of the Microsoft SQL node, which substitutes Query field expression values directly into SQL text without parameterisation. When a workflow binds untrusted input such as webhook fields to the Query field, unauthenticated external callers can execute arbitrary SQL against the connected database with the stored credential's privileges.
Exploitation Scenario
An attacker finds a public n8n webhook that triggers a customer-support or data-lookup agent workflow. The workflow places a field from the request body, such as a customer ID, into the Query field of a Microsoft SQL node v1. The attacker sends a payload that closes the intended statement and appends their own SQL, first enumerating tables, then dumping customer records or the data behind the agent's knowledge base. With a privileged credential, they can also modify records or run server-side commands. They do all of this without authenticating to n8n.
Weaknesses (CWE)
CWE-89Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')PrimaryCWE-89Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')CWE-89 — Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'): The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.
- [Architecture and Design] Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482]. For example, consider using persistence layers such as Hibernate or Enterprise Java Beans, which can provide significant protection against SQL injection if used properly.
- [Architecture and Design] If available, use structured mechanisms that automatically enforce the separation between data and code. These mechanisms may be able to provide the relevant quoting, encoding, and validation automatically, instead of relying on the developer to provide this capability at every point where output is generated. Process SQL queries using prepared statements, parameterized queries, or stored procedures. These features should accept parameters or variables and support strong typing. Do not dynamically construct and execute query strings within these features using "exec" or similar functionality, since this may re-introduce the possibility of SQL injection. [REF-867]
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