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

CVE-2026-25056: n8n Merge Node has Arbitrary File Write leading to RCE

criticalCVSS 4.0 9.4GHSA-hv53-3329-vmrm

The Merge node's SQL Query mode in n8n before 1.118.0, and 2.x before 2.4.0, lets a user who can create or edit workflows write arbitrary files to the n8n server, which can lead to remote code execution. Upgrade to 1.118.0 or 2.4.0.

Published Feb 4, 2026 · Analysis Nov 1, 2026

What an attacker can do

The Merge node can combine data with a user-written SQL query. In that mode, the query could be used to write files to the server's filesystem. The advisory classes it as unrestricted upload of a dangerous file type (CWE-434) with a failed protection mechanism (CWE-693): a control meant to keep the query from writing did not hold.

The attacker needs an authenticated account that can create or modify workflows. No user interaction is needed. Writing a file of their choice to the host can become code execution if the file lands where the server or a scheduled process will load it. The advisory says "potentially leading to remote code execution". CVSS 4.0 scores it 9.4 with a changed scope. Commands then run with the n8n process's privileges, with access to stored credentials and the network behind the host.

Who is affected

n8n below 1.118.0 on the 1.x line, and 2.0.0 up to but not including 2.4.0. This only matters if the Merge node is available and people other than fully trusted ones can edit workflows.

n8n --version
npm ls n8n

For Docker, check the image tag.

n8n

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

n8n

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

How to fix it

Upgrade to n8n 1.118.0 (1.x) or 2.4.0 (2.x), or later:

npm install -g n8n@latest

Short-term mitigations from the advisory, which the maintainers say do not fully remediate the risk:

  • Limit workflow creation and editing to fully trusted users.
  • Disable or restrict the Merge node if it is not essential. The n8n docs on blocking nodes explain how to disable nodes globally.
  • Review workflows for suspicious use of the Merge node's SQL Query mode.

How to tell if you were hit

Search workflows for Merge nodes set to SQL Query mode and read their queries for file-writing statements or unusual paths. Check the n8n host for files that appeared in unexpected places, especially in n8n's data folder, web-served paths, startup directories or cron locations, with modification times that match workflow executions. Look at execution history for Merge node runs by users who do not normally build workflows.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Impact

A vulnerability in the Merge node's SQL Query mode allowed authenticated users with permission to create or modify workflows to write arbitrary files to the n8n server's filesystem potentially leading to remote code execution.

Patches

The issue has been fixed in n8n version 2.4.0, 1.118.0. Users should upgrade to this version 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 or restrict use of the Merge node if not essential for operations.
  • Review workflows for suspicious use of the Merge node's SQL Query mode.

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

Resources

--- n8n has adopted CVSS 4.0 as primary score for all security advisories. CVSS 3.1 vector strings are provided for backwards compatibility.

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Credited to nlgbao1340.

Questions

Is CVE-2026-25056 limited to the SQL Query mode?

Yes. The advisory places the flaw in the Merge node's SQL Query mode. Other Merge modes are not described as affected.

Does it need admin access?

No. Permission to create or modify workflows is enough, according to the advisory.

Can it lead to code execution?

The advisory says arbitrary file write, potentially leading to remote code execution. Whether it does depends on where the attacker can write on your host.

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