Skip to main content
VulnerabilityPublished

n8n: PostgresTrigger Node SQL Injection Allows Authenticated Users to Execute Arbitrary SQL on Connected PostgreSQL Instances

Affects n8nSource GCVE Database

0

CVSS 5.8 Medium : upgrade to 1.123.67 when convenient.

Data as of 23 Jul 2026, 01:24 UTC

CVSS 4.0 base score
5.8Medium
How severe the flaw is on the 0–10 CVSS scale.
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:H

What to do

Upgrade n8n to 1.123.67; n8n to 2.32.1; n8n to 2.31.5.

Affected software

ProductAffectedFixed in
npmn8nAffected
  • <1.123.67
Fixed in
  • 1.123.67
npmn8nAffected
  • >=2.32.0 <2.32.1
Fixed in
  • 2.32.1
npmn8nAffected
  • >=2.0.0-rc.0 <2.31.5
Fixed in
  • 2.31.5

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

Community reviews

Loading reviews…