CVE-2026-54310: n8n: SQL Injection in Postgres v1/TimesclaeDB Nodes
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.timescaleDb to the NODESEXCLUDE environment variable.
These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.
Other sources
n8n is an open source workflow automation platform. Prior to 2.25.7 and 2.26.2, 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. This vulnerability is fixed in 2.25.7 and 2.26.2.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/n8nto a version that resolves this vulnerability.Fixed in 2.25.7 - Upgrade
Upgrade
npm/n8nto a version that resolves this vulnerability.Fixed in 2.26.2 - Upgrade
Upgrade
n8nto a version that resolves this vulnerability.Fixed in 2.25.7 - Upgrade
Upgrade
n8nto a version that resolves this vulnerability.Fixed in 2.26.2 - Configuration
Temporarily mitigate by disabling the legacy Postgres v1 node and the TimescaleDB node: add `n8n-nodes-base.postgres` and `n8n-nodes-base.timescaleDb` to the `NODES_EXCLUDE` environment variable.
n8n environment NODES_EXCLUDE = n8n-nodes-base.postgres, n8n-nodes-base.timescaleDb - Compensating control
Temporarily reduce exposure by limiting workflow creation and editing permissions to fully trusted users only.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-54310?
The severity of CVE-2026-54310 is critical with a score of 9.9.
What type of vulnerability is CVE-2026-54310?
CVE-2026-54310 is classified as an SQL Injection vulnerability.
What impact does CVE-2026-54310 have?
CVE-2026-54310 allows an authenticated user to inject and execute arbitrary SQL against the connected database.
How do I fix CVE-2026-54310?
To fix CVE-2026-54310, ensure that all user input is properly sanitized and validated to prevent SQL injection.
Who is affected by CVE-2026-54310?
CVE-2026-54310 affects users who have permission to create or modify workflows in npm/n8n.