Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to n8n with workflow editor credentials
-
DeliveryCreate or modify workflow containing Postgres v1 or TimescaleDB node
-
ExploitInject crafted SQL payload into node parameters
-
Executionn8n executes unsanitized query against connected database
-
PersistExfiltrate, modify, or destroy database contents
-
ImpactEscalate via database account privileges if over-permissioned
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 | The attacker must be authenticated to the n8n instance and hold a role that permits creating or modifying workflows - this is not a default end-user capability and requires explicit permission assignment by an n8n administrator. The target workflow must use the legacy Postgres v1 node ( |
| Impact | The vendor-assigned CVSS 9.9 (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H) is well-calibrated and independently corroborated by the advisory description. The network attack vector is accurate: n8n exposes a web interface accessible over the network. Attack complexity is genuinely low once the attacker has workflow editor access - no race conditions or chained prerequisites are required. The PR:L designation is the primary risk limiter: the attacker must hold authenticated n8n credentials with workflow creation or modification rights, which is not a guest or anonymous capability. However, in many organizational deployments, workflow editing is distributed broadly across teams, effectively lowering the practical barrier. The scope change is the most consequential metric: SQL injection pivots the attack from the n8n application into the database, multiplying potential impact. No EPSS score data was provided in the input, so exploitation probability cannot be quantified probabilistically. No CISA KEV listing and no public POC exist at time of analysis - this reduces immediate urgency compared to actively exploited CVEs, but the straightforward attack technique (SQL injection is well-understood) means POC development would be trivial for a skilled practitioner. Real-world risk is high for organizations with loosely controlled workflow editor permissions and high-privilege database accounts configured in n8n credentials; risk is meaningfully reduced where workflow editing is restricted to a small number of fully trusted administrators and where database accounts follow least-privilege principles. |
| Exploit ScenarioDerived | An attacker who holds n8n credentials with workflow editor rights creates or modifies a workflow, embedding SQL injection payloads within the parameters of a Postgres v1 or TimescaleDB node - for example, crafting a table name or query field that terminates the intended SQL and appends a malicious statement such as a UNION SELECT to exfiltrate credential tables or a DROP TABLE to destroy data. The injected SQL executes server-side under the identity of the database account configured in the n8n credential store, meaning a DBA-level account could yield full database control or even OS command execution via PostgreSQL's |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 16, 2026
SQL injection in n8n's legacy Postgres v1 and TimescaleDB workflow nodes allows an authenticated workflow editor to inject and execute arbitrary SQL against the connected database, operating under the privileges of the configured database account. Affected versions span all n8n npm releases below 2.25.7 and the 2.26.0-2.26.1 range, with the CVSS 9.9 score reflecting a confirmed scope change: the injection escapes the n8n application layer into the underlying database system (S:C), enabling full confidentiality, integrity, and availability compromise of database contents. No public exploit code and no CISA KEV listing have been identified at time of analysis, but the low-privilege requirement and network-accessible attack vector make this a critical priority for any deployment where workflow editing access is broadly granted.
RemediationAI
The primary remediation is to upgrade n8n to version 2.25.7 or 2.26.2 (or any later release), as confirmed by the vendor advisory at https://github.com/n8n-io/n8n/security/advisories/GHSA-c37g-w77q-m4vp. Administrators running the 2.25.x branch should target 2.25.7; those on the 2.26.x branch should target 2.26.2. If immediate upgrade is not feasible, two temporary compensating controls are available: first, restrict workflow creation and editing permissions exclusively to fully trusted users - this narrows the attack surface but does not eliminate risk if a trusted account is compromised or acts maliciously, and has the operational trade-off of blocking legitimate workflow development; second, disable the Postgres v1 and TimescaleDB nodes by adding n8n-nodes-base.postgres and n8n-nodes-base.timescaleDb to the NODES_EXCLUDE environment variable - this eliminates the vulnerable code paths entirely but will break all existing workflows that depend on these nodes, requiring migration to unaffected node variants before re-enabling database connectivity. The vendor explicitly notes that neither workaround fully remediates the risk; both should be treated as short-term bridges to patching.
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 vulnerability is a classic CWE-89 (Improper Neutralization of Special Elements used in an SQL Command) present in two n8n workflow node implementations: the legacy 'Postgres v1' node (n8n-nodes-base.postgres) and the 'TimescaleDB' node (n8n-nodes-base.timescaleDb). TimescaleDB is a PostgreSQL extension/derivative, and both nodes share similar SQL construction patterns, suggesting a common root cause: user-supplied workflow parameters are interpolated directly into SQL query strings without adequate parameterization or input sanitization. The affected package is pkg:npm/n8n, confirming this is the core Node.js npm distribution of the n8n workflow automation platform. The CVSS scope change (S:C) is technically accurate because a successful SQL injection breaks the application-layer trust boundary, affecting the database server as a distinct security scope from the n8n runtime itself. Depending on the permissions of the configured database account, impact can extend to reading all accessible schemas, writing or truncating data, and - in over-privileged configurations - executing OS-level operations via PostgreSQL extensions such as pg_execute_server_program or COPY TO/FROM PROGRAM.
Know when PostgreSQL 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:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H
Network-accessible n8n web UI requires only low-privilege workflow editor role; SQL injection escapes application into database (S:C) yielding full CIA impact on database contents.
Primary rating from Vendor (https://github.com/n8n-io/n8n).
CVSS VectorVendor: https://github.com/n8n-io/n8n
Lifecycle Timeline
2DescriptionCVE.org
Impact
An authenticated user with permission to create or modify workflows could supply a crafted parameters to the TimescaleDB and/or legacy Postgres v1 node's allowing arbitrary SQL to be injected and executed against the connected database within the privileges of the configured database account.
Patches
The issue has been fixed in n8n versions 2.25.7, and 2.26.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:
- Limit workflow creation and editing permissions to fully trusted users only.
- Disable the Postgres and TimescaleDB node by adding
n8n-nodes-base.postgres,n8n-nodes-base.timescaleDbto theNODES_EXCLUDEenvironment variable.
These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.
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.
More in PostgreSQL
View allPostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl
An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl
Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows re
Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.
Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar
PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allow
The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t
A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra
In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve
Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the
Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot
Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al
EUVD-2026-38470
GHSA-c37g-w77q-m4vp
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB