Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to n8n with workflow creation permissions
-
DeliveryOpen or create a MySQL, PostgreSQL, or MSSQL node in a workflow
-
ExploitSupply crafted SQL identifier (table or column name) in node config
-
ExecutionExecute the workflow to trigger query construction
-
PersistInjected SQL runs against the downstream database
-
ImpactExfiltrate or corrupt database contents
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires an authenticated n8n account that holds explicit 'workflow creation or modification' permissions - this is not a default guest or viewer role and must be deliberately assigned. The attacker must also have access to at least one database credential configured within n8n that points to a live MySQL, PostgreSQL, or Microsoft SQL Server instance; without a usable database credential, the node cannot execute queries. The vulnerability is constrained to n8n versions before 2.4.0, and only the three named database nodes are affected. The affected nodes are enabled by default but can be excluded via NODES_EXCLUDE. Unauthenticated access cannot trigger this vulnerability. The CVSS 4.0 AT:P designation confirms the dual-prerequisite nature: workflow-level access and database credential access must coexist in the same user context, which is a meaningful constraint in deployments with role separation. |
| Impact | The official CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N) scores 5.3, which underrepresents the downstream database impact if exploitation succeeds - SC:H and SI:H indicate high confidentiality and integrity compromise of the subsequent database system. The AT:P designation (attack prerequisites present) reflects the dual requirement of workflow-creation permission AND access to a configured database credential, which appropriately narrows the exploitable population in governed deployments. No EPSS score was included in the provided data, so exploitation probability cannot be quantified numerically. No CISA KEV listing and no public exploit code have been identified, placing this in lower operational urgency. However, the attack pattern for identifier injection is well-understood and trivial to craft manually by any competent attacker once authenticated - the limiting factor is access, not technique. Organizations running n8n in multi-tenant or semi-trusted-user configurations (e.g., team-shared instances) should treat this as higher priority than the aggregate 5.3 score suggests, given the database-level blast radius. |
| Exploit ScenarioDerived | An authenticated n8n user who holds workflow creation permissions and has access to a configured database credential creates a new workflow database node, entering a crafted table name such as real_table; GRANT ALL PRIVILEGES ON *.* TO attacker@'%'; -- in the node configuration parameter. When the workflow executes, n8n builds the SQL query using the unsanitized identifier, causing the injected statement to execute against the connected MySQL, PostgreSQL, or MSSQL instance with the privileges of the configured database credential. No public exploit code has been identified, but the identifier injection technique is a well-documented variant of CWE-89 requiring no specialized tooling. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 24, 2026
SQL injection in n8n's MySQL, PostgreSQL, and Microsoft SQL database integration nodes (all versions before 2.4.0) allows authenticated users with workflow creation permissions to execute arbitrary SQL commands against connected databases by supplying crafted identifier values - table or column names - in node configuration parameters. The nodes failed to escape SQL identifiers when constructing queries, bypassing the safety guarantees users expected from parameterized inputs and enabling injection that directly impacts downstream database confidentiality and integrity. Reported by the NATO Cyber Security Centre; vendor-released patch is confirmed in n8n 2.4.0, with no public exploit code or CISA KEV listing identified at time of analysis.
RemediationAI
The primary remediation is to upgrade n8n to version 2.4.0 or later, which resolves the identifier escaping flaw across all three affected database nodes (vendor advisory: https://github.com/n8n-io/n8n/security/advisories/GHSA-f3f2-mcxc-pwjx; patch commit: https://github.com/n8n-io/n8n/commit/f73fae6fe7fc34907bba102648a9997186aa4385). If immediate upgrade is not feasible, two interim workarounds are available per the vendor advisory: first, restrict workflow creation and editing permissions to fully trusted users only - this reduces the attack surface but does not fix the underlying code flaw and is ineffective if any trusted user is compromised; second, disable the three affected nodes by adding n8n-nodes-base.mySql, n8n-nodes-base.postgres, and n8n-nodes-base.microsoftSql to the NODES_EXCLUDE environment variable, which blocks exploitation entirely but also disables legitimate database integration functionality. Both workarounds are explicitly noted by the vendor as incomplete mitigations and should be treated as short-term measures only pending the upgrade to 2.4.0.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-89 (Improper Neutralization of Special Elements used in an SQL Command) arising from a distinction between parameterized query values and SQL identifiers. Parameterized queries protect data values (WHERE col = ?) but do not protect structural identifiers such as table names and column names, which must be separately escaped using dialect-specific quoting (backtick-quoting in MySQL, double-quote escaping in PostgreSQL/MSSQL). n8n's mySql, postgres, and microsoftSql nodes passed user-controlled identifier values from node configuration parameters directly into query construction without applying identifier escaping or allowlisting. The affected package is npm/n8n (CPE: cpe:2.3:a:n8n:n8n:*:*:*:*:*:*:*:*) across all releases prior to 2.4.0. The patch is tracked at commit f73fae6fe7fc34907bba102648a9997186aa4385.
Know when N8n gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N
Network-accessible with low complexity; PR:L for required authenticated workflow-creator role; scope changes to downstream database (S:C) with high confidentiality and integrity impact; no availability impact described in the advisory.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
n8n before version 2.4.0 contains a sql injection vulnerability in MySQL, PostgreSQL, and Microsoft SQL nodes that allows authenticated users to inject arbitrary SQL through unescaped identifier values in node configuration parameters. Attackers with workflow creation permissions can supply specially crafted table or column names to execute unauthorized database commands and compromise data integrity.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation
n8n workflow automation (through 1.121.2) allows authenticated users to execute arbitrary code via the n8n service, with
n8n workflow automation (1.65.0 to 1.121.0) allows unauthenticated file access through form-based workflows. A critical
n8n has a fifth critical RCE vulnerability (CVSS 9.9) in the Expression evaluator, enabling code execution through craft
Authenticated users who can create or modify an n8n workflow can achieve remote code execution on the n8n host by abusin
A prototype pollution vulnerability in the XML and GSuiteAdmin nodes of n8n workflow automation platform allows authenti
An authenticated user with workflow creation or modification privileges in n8n workflow automation platform can exploit
n8n-workflows Main Commit ee25413 allows attackers to execute a directory traversal via the download_workflow function w
Second-order expression injection in n8n workflow automation before 2.10.1/2.9.3/1.123.22. Crafted workflow data trigger
An arbitrary file upload vulnerability in the Chat Trigger component of N8N v1.95.3, v1.100.1, and v1.101.1 allows attac
Authenticated n8n users can hijack administrator accounts when LDAP authentication is enabled by manipulating their LDAP
The n8n package 0.218.0 for Node.js allows Escalation of Privileges. Rated high severity (CVSS 8.8), this vulnerability
EUVD-2026-38753
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB