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: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-reachable injection via authenticated (PR:L) n8n session changes scope to PostgreSQL backend, yielding full C/I/A impact on that system.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
3DescriptionCVE.org
n8n before 1.123.67, 2.31.5, and 2.32.1 contains a SQL injection vulnerability in the PostgresTrigger node, which interpolates user-supplied identifier parameters (channel, function, and trigger names) into SQL statements without proper escaping. An authenticated user can inject arbitrary SQL executed against the connected PostgreSQL database with the configured credential's privileges, allowing full read and write access.
AnalysisAI
SQL injection in n8n's PostgresTrigger node enables authenticated users to execute arbitrary SQL against connected PostgreSQL databases with the configured credential's full privileges. Affected versions span the n8n 1.x branch before 1.123.67, the 2.x branch before 2.31.5, and the 2.32.x branch before 2.32.1. Successful exploitation yields unrestricted read and write access to the backend PostgreSQL instance - a scope-change impact confirmed by the CVSS 4.0 SC:H/SI:H/SA:H rating - with no public exploit identified at time of analysis and no CISA KEV listing.
Technical ContextAI
n8n (cpe:2.3:a:n8n-io:n8n) is a Node.js-based workflow automation platform distributed via npm. The PostgresTrigger node allows workflows to react to PostgreSQL LISTEN/NOTIFY events and database triggers. The root cause (CWE-89: SQL Injection) is that user-supplied identifier parameters - specifically the channel name, function name, and trigger name - are interpolated directly into dynamically constructed SQL strings without sanitization or parameterization. Because SQL identifiers (table names, function names, channel names) cannot be passed as bind parameters in standard PostgreSQL drivers, the node relied on string interpolation, creating the injection surface. The configured PostgreSQL credential governs the blast radius: if the credential holds superuser or broad schema privileges, the attacker inherits them entirely.
RemediationAI
Vendor-released patches are available: upgrade n8n to version 1.123.67 (for 1.x deployments), 2.31.5 (for 2.x deployments below 2.32.0), or 2.32.1 (for 2.32.x deployments), per the GitHub Security Advisory GHSA-jqwr-vx3p-r266. If immediate upgrade is not feasible, three mitigations are available with trade-offs. First, restrict n8n instance access to fully trusted users only - this limits the authenticated attacker pool but does not eliminate the vulnerability and may not be operationally viable in multi-user environments. Second, disable the PostgresTrigger node entirely by adding 'n8n-nodes-base.postgresTrigger' to the NODES_EXCLUDE environment variable - this prevents exploitation of this specific attack surface but breaks any workflows relying on PostgreSQL trigger-based event handling. Third, ensure PostgreSQL credentials configured in n8n are scoped to minimum required privileges and explicitly exclude SUPERUSER roles - this does not prevent exploitation but limits the blast radius by constraining what injected SQL can accomplish. The vendor explicitly notes these workarounds do not fully remediate the risk and should be treated as short-term measures only.
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-56101
GHSA-m6wx-qjxf-vr9v