n8n: PostgresTrigger Node SQL Injection Allows Authenticated Users to Execute Arbitrary SQL on Connected PostgreSQL Instances
Affects n8nSource GCVE Database
CVSS 5.8 Medium : upgrade to 1.123.67 when convenient.
Data as of 23 Jul 2026, 01:24 UTC
- Patch
- Available – fixed in 1.123.67, 2.32.1, 2.31.5
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:HWhat to do
Upgrade n8n to 1.123.67; n8n to 2.32.1; n8n to 2.31.5.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmn8n | Affected
| Fixed in
|
| npmn8n | Affected
| Fixed in
|
| npmn8n | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A fix is available in n8n versions 1.123.67, 2.31.5, and 2.32.1 or later. Users should upgrade to these versions to remediate the vulnerability. If immediate upgrade is not possible, temporary mitigations include restricting n8n instance access to fully trusted users, disabling the PostgresTrigger node via the NODES_EXCLUDE environment variable, and ensuring PostgreSQL credentials have minimum required privileges without SUPERUSER roles. These mitigations do not fully remediate the risk and should only be used short-term.
Description
A SQL injection vulnerability exists in the Postgres Trigger node of n8n, allowing authenticated users to inject arbitrary SQL commands. This occurs because user-supplied identifier parameters are interpolated into SQL statements without proper escaping. Exploitation grants full read and write access to the connected PostgreSQL database using the configured credentials. The vulnerability affects n8n versions prior to 1.123.67 and versions from 2.32.0 up to but not including 2.32.1. Fixed versions are 1.123.67, 2.31.5, and 2.32.1 or later. Temporary mitigations include restricting access to trusted users, disabling the PostgresTrigger node, and limiting PostgreSQL credential privileges. These mitigations do not fully remediate the risk and upgrading is recommended.
References
- github.com/n8n-io/n8n/security/advisories/GHSA-jqwr-vx3p-r266 (opens in a new tab)
- github.com/n8n-io/n8n (opens in a new tab)
- github.com/n8n-io/n8n/releases/tag/n8n@1.123.67 (opens in a new tab)
- github.com/n8n-io/n8n/releases/tag/n8n@2.31.5 (opens in a new tab)
- github.com/n8n-io/n8n/releases/tag/n8n@2.32.1 (opens in a new tab)