CVE-2026-110840
Executive Summary
CVE-2026-110840 is an SQL injection vulnerability in n8n's version 1 Microsoft SQL node, affecting n8n before 2.41.4 and 2.42.x before 2.42.1. The node substitutes Query field expression values directly into SQL text without parameterisation, so when a workflow binds untrusted input (for example, webhook fields) to the Query field, unauthenticated external callers can execute arbitrary SQL against the connected database using the stored credential's privileges. Organisations running self-hosted or internet-exposed n8n instances with MSSQL-backed workflows are at risk of full database read/write and potential downstream compromise.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Technical Analysis
n8n is a workflow automation platform. The vulnerable component is the Microsoft SQL node (version 1), which allows workflow authors to issue SQL statements against a connected Microsoft SQL Server database. According to the NVD description, the node "substitutes Query field expression values directly into SQL text without parameterisation."
The core defect is a classic CWE-89 (Improper Neutralisation of Special Elements used in an SQL Command): user-controlled values are concatenated into the SQL statement string rather than being passed as bound parameters. In n8n's workflow model, the Query field can contain expressions — dynamic values resolved at execution time from upstream workflow nodes. When a workflow binds untrusted external input, such as fields delivered by a webhook trigger, to that Query field, the resolved value becomes part of the raw SQL text.
Two properties make this particularly dangerous:
- Unauthenticated reachability. If a workflow is triggered by a webhook, the injected value originates from an external HTTP caller who does not need to authenticate to n8n. The n8n instance merely relays the value into the query.
- Credential-privileged execution. The query is executed against the connected database using the stored credential configured on the MSSQL node. The attacker therefore inherits the permissions of that credential — not the (potentially lower) permissions of the anonymous caller. This negates the isolation normally provided by least-privilege web-facing accounts.
The attack surface is bounded by configuration: a vulnerable instance must (a) run an affected n8n version, (b) contain at least one workflow that uses the version 1 Microsoft SQL node, and (c) feed the Query field from untrusted input. Instances without MSSQL nodes, or whose Query fields are static, are not exploitable through this path. Because the flaw lives in how expressions are rendered into SQL text, it is a logic/implementation defect rather than a memory-safety or parsing bug, and standard input sanitisation is unlikely to be applied by the node itself.
No affected version array was supplied, but the NVD description fixes the boundaries: all versions before 2.41.4, and 2.42.x releases before 2.42.1.
Exploitation Scenarios
No public proof-of-concept is available (PoC status: None; Nuclei template: No; exploit code: No). The following chain is inferred from the vulnerability class and the NVD description; it does not rely on any fabricated function names, endpoints, or parameters.
Reconnaissance / target identification. An attacker identifies an n8n instance reachable over the network, including any internet-exposed self-hosted deployment. The presence of a webhook-driven workflow that writes to Microsoft SQL is the prerequisite. Public webhook paths are typically discoverable through normal web enumeration because webhook triggers are designed to accept external calls. The attacker determines that a workflow exists whose MSSQL node consumes an externally supplied value in its Query field.
Triggering the flaw class. The attacker sends crafted input to the webhook (or other untrusted entry point) that the workflow binds to the Query field. Because the node interpolates that value directly into the SQL text — explicitly stated in the NVD description — the input is not treated as data but as part of the statement. No authentication to n8n is required for a webhook trigger, matching the description's "unauthenticated external callers."
Payload / execution. At the vulnerability-class level, the attacker supplies SQL syntax designed to terminate or alter the intended statement and append their own commands (for example, crafting the value so the resulting SQL text executes attacker-chosen SQL). The specific delimiter, comment token, or concatenation technique depends on the surrounding query the workflow author wrote and is not documented in the available data; it is therefore not specified here. The injected statement executes against the Microsoft SQL Server using the stored credential's privileges.
Post-exploitation impact. Successful injection yields arbitrary SQL execution with the database credential's rights. This can include unauthorised data retrieval, modification or deletion of records, and — depending on the credential's privileges and the database's configuration — escalation to further database or host actions. The primary blast radius is the connected Microsoft SQL database; secondary risk arises from any data the workflow or database holds that enables lateral movement.
Impact Assessment
The vulnerability is a network-reachable SQL injection with an unauthenticated attack vector in the common webhook scenario. Applying CVSS v3.1 to the described conditions gives AV:N / AC:L / PR:N / UI:N / S:U / C:H / I:H / A:H, i.e. a 9.8 (Critical) base score — note that no official CVSS score or vector was published with this advisory (NVD CVSS: N/A; vector: N/A), and the value above is a derived estimate from the description, not a vendor score. EPSS is 0.00292, placing the CVE at roughly the 20.3rd percentile of exploited CVEs at the time of assessment, indicating low near-term exploitation likelihood — though EPSS is probabilistic and can rise quickly if a PoC emerges.
Business impact centres on confidentiality, integrity, and availability of the Microsoft SQL database connected to the vulnerable node: exfiltration of regulated or business-critical data, unauthorised modification, and destructive statements all fall within the "arbitrary SQL" capability. The blast radius is defined by the privileges of the stored credential. If that credential is over-privileged (for example, db_owner or sysadmin), the compromise can extend beyond a single database. Organisations that expose n8n webhooks to the internet and store high-value data behind MSSQL are the most exposed. Because n8n is frequently used to bridge external events into internal systems, a vulnerable workflow can also function as a pivot into downstream services. CISA KEV status is No, and no exploit code or PoC is currently known, which moderates immediate risk.
Detection Guidance
Sigma Rule
title: n8n MSSQL Node SQL Injection Attempt (CVE-2026-110840)
id: 8f6c1a2e-3b4d-4e7a-9c11-0d2e5f7a9b31
status: experimental
description: Detects SQL injection payload patterns reaching n8n webhook endpoints that
are bound to the version 1 Microsoft SQL node Query field (CVE-2026-110840).
references:
- https://nvd.nist.gov/vuln/detail/CVE-2026-110840
author: valtersit.com
date: 2026/01/01
tags:
- attack.t1190
- cwe.89
logsource:
category: webserver
product: n8n
detection:
selection_path:
cs-uri-stem|contains:
- '/webhook/'
- '/webhook-test/'
selection_payload:
cs-uri-query|contains:
- "' OR "
- "' UNION "
- '--'
- ';--'
- 'xp_cmdshell'
- 'WAITFOR DELAY'
- 'SLEEP('
- 'CAST('
condition: selection_path and selection_payload
fields:
- c-ip
- cs-uri-stem
- cs-uri-query
falsepositives:
- Legitimate workflow input containing SQL-like characters
level: high
YARA Rule
rule CVE_2026_110840_n8n_mssql_sqli
{
meta:
description = "Detects SQL injection payload artefacts associated with n8n Microsoft SQL node (CVE-2026-110840)"
author = "valtersit.com"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2026-110840"
date = "2026-01-01"
severity = "high"
strings:
$sqli1 = "' OR " ascii wide nocase
$sqli2 = "' UNION " ascii wide nocase
$sqli3 = "xp_cmdshell" ascii wide nocase
$sqli4 = "WAITFOR DELAY" ascii wide nocase
$sqli5 = "SYSTEM_USER" ascii wide nocase
$sqli6 = "@@version" ascii wide nocase
$comment = "--" ascii
condition:
uint16(0) == 0x5A4D or
(2 of ($sqli*) and $comment)
}
Suricata IDS Rule
alert http any any -> any any (msg:"CVE-2026-110840 n8n MSSQL Node SQL Injection Attempt"; flow:to_server,established; http.uri; content:"/webhook"; nocase; http.uri; content:"OR"; nocase; content:"UNION"; nocase; distance:0; pcre:"/(\%27|')\s*(OR|UNION|WAITFOR|;)/Ui"; reference:cve,2026-110840; reference:url,nvd.nist.gov/vuln/detail/CVE-2026-110840; classtype:web-application-attack; sid:2026110840; rev:1;)
Elastic Detection
sequence by source.ip with maxspan=30s
[ network where network.protocol == "http" and
http.request.method in ("GET","POST") and
wildcard(http.request.path, "/webhook*") and
wildcard(url.query, "*'*OR*") ]
[ network where network.protocol == "http" and
wildcard(http.request.path, "/webhook*") and
(wildcard(url.query, "*UNION*") or wildcard(url.query, "*xp_cmdshell*")) ]
Splunk SPL Query
index=web OR index=proxy
| eval uri=coalesce(uri, url, cs_uri_stem)
| where match(uri, "(?i)/webhook")
| eval payload=coalesce(query_string, url, cs_uri_query)
| where match(payload, "(?i)('\\s*(or|union)|xp_cmdshell|waitfor\\s+delay|--|;--)")
| stats count min(_time) as first_seen max(_time) as last_seen values(payload) as payloads by src_ip, uri
| where count >= 1
Wazuh OSSEC Rule
<group name="web,n8n,sqli,">
<rule id="1108400" level="12">
<if_sid>31100</if_sid>
<url>/webhook</url>
<regex type="pcre2">(?i)('|\%27)\s*(or|union)|xp_cmdshell|waitfor\s+delay|information_schema</regex>
<description>CVE-2026-110840: Possible SQL injection against n8n webhook bound to MSSQL node</description>
<mitre>
<id>T1190</id>
</mitre>
</rule>
</group>
Mitigation & Patch Guidance
Patch confidence: 2/4 (CLAIMED — single source claims patch (not independently confirmed)); the patch source is OSV. Upgrade to n8n 2.41.4 or 2.42.1 (or later). Because the fix is claimed by only one source and not independently confirmed, verify against the upstream n8n release notes before relying on it.
Immediate mitigations. If prompt patching is not possible: (a) avoid the version 1 Microsoft SQL node in workflows that consume untrusted input, in favour of a parameterised query mechanism; (b) ensure the stored MSSQL credential is strictly least-privilege, limiting the blast radius of any injection; (c) restrict network access to n8n instances and webhook endpoints, especially from the public internet; (d) review existing workflows that bind webhook or other external fields to a Microsoft SQL node Query field and, where possible, convert them to use bound parameters. OSV lists the affected code as unfixed within its tracked range; confirm the exact patched version against official release notes.
Patch / upgrade steps. Identify all n8n deployments and their versions; upgrade to 2.41.4 for the 2.41.x line and 2.42.1 for the 2.42.x line (or newer). Confirm success by validating the installed version and re-auditing any MSSQL nodes for parameterisation.
Long-term hardening. Enforce parameterised queries as a coding standard for all database nodes. Apply least-privilege to every stored database credential. Treat webhook inputs as untrusted by default and validate them before use. Continuously monitor advisories for n8n, as this is a rapidly evolving automation platform, and keep instances updated. Deploy the detection rules above to catch injection attempts at the network and web layers.
References
- NVD — CVE-2026-110840: https://nvd.nist.gov/vuln/detail/CVE-2026-110840
- OSV Advisory (patch source, claims fix in 2.41.4 / 2.42.1): OSV entry for CVE-2026-110840
- n8n official release notes — https://github.com/n8n-io/n8n/releases
- CWE-89: Improper Neutralisation of Special Elements used in an SQL Command — https://cwe.mitre.org/data/definitions/89.html
- MITRE ATT&CK T1190: Exploit Public-Facing Application — https://attack.mitre.org/techniques/T1190/
No known threat actor campaigns or exploit-in-the-wild activity has been identified for this CVE. EPSS is 0.00292 (20.3rd percentile); CISA KEV status is No; no public PoC, Nuclei template, or exploit code is available at the time of writing.
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.