n8n: PostgresTrigger Node SQL Injection Allows Authenticated Users to Execute Arbitrary SQL on Connected PostgreSQL Instances
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.
AI Analysis
Technical Summary
The n8n Postgres Trigger node suffers from a SQL injection vulnerability (CWE-89) due to improper escaping of user-supplied identifier parameters (channel, function, and trigger names) in SQL statements. Authenticated users can exploit this to execute arbitrary SQL commands on the connected PostgreSQL database with the privileges of the configured credentials, resulting in full read and write access. The vulnerability affects versions <1.123.67 and >=2.32.0 <2.32.1. Official fixes are available in versions 1.123.67, 2.31.5, and 2.32.1. Temporary mitigations include restricting access, disabling the vulnerable node, and using least-privilege credentials.
Potential Impact
Successful exploitation allows an authenticated user to execute arbitrary SQL commands on the connected PostgreSQL database with the privileges of the configured credentials. This grants full read and write access to the database, potentially compromising data confidentiality and integrity.
Mitigation Recommendations
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.
n8n: PostgresTrigger Node SQL Injection Allows Authenticated Users to Execute Arbitrary SQL on Connected PostgreSQL Instances
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.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The n8n Postgres Trigger node suffers from a SQL injection vulnerability (CWE-89) due to improper escaping of user-supplied identifier parameters (channel, function, and trigger names) in SQL statements. Authenticated users can exploit this to execute arbitrary SQL commands on the connected PostgreSQL database with the privileges of the configured credentials, resulting in full read and write access. The vulnerability affects versions <1.123.67 and >=2.32.0 <2.32.1. Official fixes are available in versions 1.123.67, 2.31.5, and 2.32.1. Temporary mitigations include restricting access, disabling the vulnerable node, and using least-privilege credentials.
Potential Impact
Successful exploitation allows an authenticated user to execute arbitrary SQL commands on the connected PostgreSQL database with the privileges of the configured credentials. This grants full read and write access to the database, potentially compromising data confidentiality and integrity.
Mitigation Recommendations
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.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-jqwr-vx3p-r266
- Osv Schema Version
- 1.4.0
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 4.0
Threat ID: 6a616bcb9c2644c7f80dbc1e
Added to database: 07/23/2026, 01:18:03 UTC
Last enriched: 07/23/2026, 01:24:21 UTC
Last updated: 07/23/2026, 03:46:26 UTC
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.