AgentbeamBeta
AI agent vulnerability · n8n

CVE-2026-33713: n8n has SQL Injection in Data Table Node via orderByColumn Expression

highCVSS 4.0 8.7 · 3.1 9.9GHSA-98c2-4cr3-4jc3

n8n's Data Table Get node is vulnerable to SQL injection through the `orderByColumn` expression. A user who can create or edit workflows can run SQL against the n8n database. On PostgreSQL this includes multiple statements, so data can be changed or deleted. Fixed in n8n 1.123.26, 2.13.3 and 2.14.1.

Published Mar 26, 2026 · Analysis Nov 21, 2026

What an attacker can do

The Data Table Get node builds its sort clause from orderByColumn. When that value is an expression carrying attacker-controlled text, the text reaches the SQL query unsanitized (CWE-89). The advisory does not give the code path or a payload.

The attacker needs an account that can create or modify workflows. The effect depends on the database. On the default SQLite database, only single statements work, so the practical attack surface is limited. On PostgreSQL, multi-statement execution is possible, which allows data modification and deletion in the n8n database. That database holds workflows, execution data and stored credentials.

The risk is higher where a workflow feeds outside input, such as a webhook field, into orderByColumn. Then even someone who cannot edit workflows may be able to supply the injected text. The CVSS 3.1 vector rates scope as changed with high confidentiality, integrity and availability impact.

Who is affected

Three ranges: < 1.123.26, >= 2.0.0-rc.0, < 2.13.3, and exactly 2.14.0. PostgreSQL-backed instances face the most serious form of the flaw.

Check the version:

npm ls n8n

For Docker, check the image tag. Then search your workflows for Data Table Get nodes whose orderByColumn is an expression.

n8n

Ecosystem
npm
Affected
< 1.123.26
Fixed in
1.123.26
Check
npm ls n8n

n8n

Ecosystem
npm
Affected
= 2.14.0
Fixed in
2.14.1
Check
npm ls n8n

n8n

Ecosystem
npm
Affected
>= 2.0.0-rc.0, < 2.13.3
Fixed in
2.13.3
Check
npm ls n8n

How to fix it

Upgrade to 1.123.26, 2.13.3 or 2.14.1, or later on your release line.

npm install [email protected]

Short-term mitigations, which the advisory says do not fully remediate the risk:

  • Limit workflow creation and editing to fully trusted users.
  • Add n8n-nodes-base.dataTable to NODES_EXCLUDE to disable the Data Table node.
  • Review workflows where a Data Table Get node sets orderByColumn to an expression using external or user-supplied input.

How to tell if you were hit

Audit workflows for Data Table Get nodes with an expression in orderByColumn, and trace what feeds that expression. On PostgreSQL, check the database log for statements that do not match n8n's normal queries, such as DROP, DELETE or UPDATE from the n8n database role, and for unexpected data table changes. The advisory names no specific log line.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Impact

An authenticated user with permission to create or modify workflows could exploit a SQL injection vulnerability in the Data Table Get node. On default SQLite DB, single statements can be manipulated and the attack surface is practically limited. On PostgreSQL deployments, multi-statement execution is possible, enabling data modification and deletion.

Patches

The issue has been fixed in n8n versions 1.123.26, 2.13.3, and 2.14.1. 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 Data Table node by adding n8n-nodes-base.dataTable to the NODES_EXCLUDE environment variable.
  • Review existing workflows for Data Table Get nodes where orderByColumn is set to an expression that incorporates external or user-supplied input.

These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.

Credited to CodeByMoriarty.

Questions

Is CVE-2026-33713 worse on PostgreSQL?

Yes. The advisory says SQLite allows only single statements, which limits the attack. PostgreSQL permits multi-statement execution, so data can be modified or deleted.

Do I need an account to exploit it?

The advisory requires an authenticated user who can create or modify workflows.

Which version fixes it?

1.123.26, 2.13.3 or 2.14.1, depending on your release line.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More n8n vulnerabilities

All n8n entries