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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
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
4DescriptionCVE.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.
AnalysisAI
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.
Technical ContextAI
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.
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.
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
Same weakness CWE-89 – SQL Injection
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-38470
GHSA-c37g-w77q-m4vp