AgentbeamBeta
AI agent vulnerability · n8n

CVE-2026-27497: n8n has Potential Remote Code Execution via Merge Node

criticalCVSS 4.0 9.4 · 3.1 9.9GHSA-wxx7-mcgf-j869

The SQL query mode of the n8n Merge node lets a user who can create or edit workflows run arbitrary code and write arbitrary files on the n8n server. Fixed in n8n 1.123.22, 2.9.3 and 2.10.1. Excluding the Merge node is a stopgap.

Published Feb 25, 2026 · Updated Feb 27, 2026 · Analysis Nov 8, 2026

What an attacker can do

The Merge node can combine inputs by running a SQL query over them. The advisory says an authenticated workflow author could use that SQL mode to run code and write files on the server (CWE-89 and CWE-94). It does not publish the exact query technique.

The attacker needs an n8n login with workflow edit rights and network access. The CVSS 3.1 vector is 9.9: low privileges, no user interaction, scope changed, high impact on all three goals. Arbitrary file write on the server is a strong primitive on its own, since it can plant scripts or overwrite configuration.

On a shared instance, any member who can build workflows can therefore take over the host. From there they can read the credentials n8n stores for databases, cloud accounts and SaaS tools, and use them. The same applies to a compromised low-rights account or an agent that is allowed to author workflows.

Who is affected

npm package n8n: versions before 1.123.22, 2.0.0 up to below 2.9.3, and 2.10.0. Workflows that use the Merge node in SQL query mode are the vulnerable path, though any user able to create one can trigger it. Check the version:

npm ls -g n8n

In Docker, check the image tag.

n8n

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

n8n

Ecosystem
npm
Affected
>= 2.0.0, < 2.9.3
Fixed in
2.9.3
Check
npm ls n8n

n8n

Ecosystem
npm
Affected
>= 2.10.0, < 2.10.1
Fixed in
2.10.1
Check
npm ls n8n

How to fix it

Upgrade to n8n 1.123.22, 2.9.3 or 2.10.1, or any later release, to remediate all known issues named in the advisory.

npm install -g [email protected]

Stopgaps that do not fully fix it: restrict workflow creation and editing to fully trusted users, and add n8n-nodes-base.merge to the NODES_EXCLUDE environment variable to disable the Merge node.

How to tell if you were hit

Review workflows that use a Merge node and check its mode for SQL queries that contain unusual statements or file-related functions. Check the n8n server for files written outside the n8n data directory, new scripts, and unexpected child processes of the n8n process. Review who created or edited those workflows and when.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Impact

An authenticated user with permission to create or modify workflows could leverage the Merge node's SQL query mode to execute arbitrary code and write arbitrary files on the n8n server.

Patches

The issues have been fixed in n8n versions 2.10.1, 2.9.3, and 1.123.22. Users should upgrade to one of these versions or later to remediate all known vulnerabilities.

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 Merge node by adding n8n-nodes-base.merge to the NODES_EXCLUDE environment variable.

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

Credited to allsmog, nil340.

Questions

Does CVE-2026-27497 need authentication?

Yes. The attacker needs an account with permission to create or modify workflows. No user interaction is needed.

What can the attacker do on the server?

The advisory says run arbitrary code and write arbitrary files on the n8n server through the Merge node's SQL query mode.

Which n8n versions fix CVE-2026-27497?

1.123.22, 2.9.3 and 2.10.1, and later releases.

Can I disable the vulnerable node?

Yes, as a stopgap: add n8n-nodes-base.merge to NODES_EXCLUDE. The advisory says this does not fully remove the risk, so upgrade.

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