NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · n8n

CVE-2026-54311: n8n: Merge Node SQL Mode Prototype Pollution

mediumCVSS 4.0 6.0 · 3.1 6.3GHSA-9c38-2mcm-q7f7

In n8n, the Merge node's SQL Query mode ran in a sandbox that was cached and shared by every execution on the instance. A user who can edit workflows could pollute its prototypes and then see data from other users' Merge SQL runs. Only multi-user instances are affected. Fixed in n8n 2.25.7 and 2.26.2.

Published Jun 16, 2026 · Updated Jul 20, 2026 · Analysis Nov 2, 2026

What an attacker can do

The Merge node can combine inputs with an SQL query. n8n evaluates that query in a sandbox context. Before the fix, the context was created once, cached, and reused for all workflow executions on the instance. Any change one workflow made to the sandbox's object prototypes therefore stayed in place for later runs.

A low-privileged user with permission to create or modify workflows could use this to plant prototype changes that fire when someone else's Merge SQL query runs. The result is interception of workflow data processed by other users or projects on the same instance. The weakness is classed as exposure of data to the wrong session.

The advisory limits scope. It affects only multi-user instances where more than one user can create and execute workflows with a Merge node in SQL Query mode. A single-user instance has no second party to spy on. The impact is on confidentiality only. The advisory lists no integrity or availability impact, and attack complexity is rated high because the attacker depends on other users' runs happening.

Who is affected

n8n on npm below 2.25.7, plus 2.26.0 and 2.26.1. You are exposed if several users or projects share the instance and any of them use the Merge node with the SQL Query mode. Check your version:

npm ls n8n

Then search workflows for Merge nodes whose mode is set to SQL Query.

n8n

Ecosystem
npm
Affected
>= 2.26.0, < 2.26.2
Fixed in
2.26.2
Check
npm ls n8n

n8n

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

How to fix it

Upgrade to n8n 2.25.7 or 2.26.2, or later.

npm install -g [email protected]

From the advisory, temporary and incomplete measures: limit workflow creation and editing to fully trusted users, or disable the Merge node by adding n8n-nodes-base.merge to the NODES_EXCLUDE environment variable. Disabling Merge breaks any workflow that uses it, so test first.

How to tell if you were hit

The advisory lists no indicators. Review recent edits to workflows containing Merge nodes in SQL Query mode, made by users who do not normally own those workflows. Look for SQL queries in those nodes that reference __proto__, constructor or prototype, or that otherwise do more than combine inputs. Restarting n8n clears any pollution held in the cached sandbox, but it does not tell you whether data was already read.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Impact

An authenticated user with permission to create or modify workflows could pollute the sandbox used by the Merge node's SQL Query mode. Because the sandbox context was cached and reused across all workflow executions on the instance, prototype mutations introduced by one user's workflow persist into subsequent Merge SQL executions belonging to other users or projects. This allowed a low-privileged attacker to intercept workflow data processed by other users on the same instance.

This issue only affects multi-user n8n instances where more than one user has permission to create and execute workflows containing the Merge node in SQL Query mode.

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 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 sm1ee.

Questions

Is a single-user n8n instance affected by CVE-2026-54311?

The advisory says only multi-user instances are affected, where more than one user can create and run workflows with a Merge node in SQL Query mode.

What do I need to exploit CVE-2026-54311?

A login with permission to create or modify workflows. Attack complexity is rated high, as the data intercepted comes from other users' later executions.

Which n8n versions fix CVE-2026-54311?

2.25.7 and 2.26.2 or later. Versions below 2.25.7, and 2.26.0 and 2.26.1, are vulnerable.

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