n8n Merge node allows authenticated users to run code and write files

CriticalSE Fix-First Score 51/100CVE-2026-27497SE-AIV-01845Injection into a database or queryAI apps and chat interfacesMade public 26 Feb 2026

Download as PDF

What this means

An attacker with permission to create or edit workflows in n8n can run arbitrary code on the server and write files to it. This could lead to full compromise of the n8n server, theft of stored credentials and data, or use of the server to attack other systems.

SecurityElites Manager Brief: the decision in one minute

A critical flaw in n8n's Merge node lets authorized workflow creators execute code and modify files on your server. If you run n8n and allow staff to build workflows, you must upgrade immediately.

SecurityElites Fix-First Score51 of 100
Our own ranking of what to fix first. Real attacks count most, then the chance of attack, then severity.
SecurityElites fix windowWithin 7 days
Critical severity. This is our suggestion from common practice; your own policy comes first.
Who should own the fixPlatform engineering or DevOps team.
Likely effortAbout 30 minutes per n8n instance: download the fixed version, back up your database, upgrade, restart, and verify. Downtime depends on your backup and deployment method.

Questions to ask your team or supplier

  • Who in our organization has permission to create and edit workflows in n8n? Are all of those people fully trusted?
  • Have we checked our n8n execution logs and workflow history for any Merge nodes we did not create? If so, what did they do?
  • What credentials and external systems is our n8n instance connected to? Could they be compromised if someone ran arbitrary code on the n8n server?

Message you can forward to the owning team

Security notice: n8n Merge node allows authenticated users to run code and write files (CVE-2026-27497)

Severity: Critical
SecurityElites Fix-First Score: 51 of 100
SecurityElites fix window: Within 7 days
Action: upgrade to n8n 2.10.1, n8n-nodes-base 2.10.1 or later.
What we need from you: confirm whether we run this software, who owns it, and the date it will be fixed.
Full guide: https://securityelites.com/ai-vulnerabilities/cve-2026-27497-n8n-merge-node-allows-authenticated-users-to-run-code/
Source: SecurityElites AI Vulnerabilities Database, record SE-AIV-01845

What is at stake in your AI setup

  • Keys for external AI providers (such as OpenAI, Anthropic API keys) stored as n8n credentials could be stolen or used to run up your bill.
  • Data in workflows, including user inputs, chat histories, and document content being processed through AI nodes could be exfiltrated or modified.
  • Connections to custom tools and external systems that AI agents use (databases, APIs, webhooks) could be redirected or abused.
  • The n8n server itself could be used as a compute resource to run attacker code, increasing your infrastructure costs.

Map where your company uses AI

Who is exposed

  • Teams running n8n version 1.123.21 or earlier, 2.0.0 to 2.9.2, or 2.10.0.
  • Any user in those instances with permission to create or modify workflows.
  • Credentials and data stored in n8n that the server process can access.
  • Other systems reachable from the n8n server.

Upgrades you need

SoftwareAffected versionsMove to
n8n
npm
Every version before 1.123.22; 2.0.0 up to, but not including, 2.9.3; 2.10.0 up to, but not including, 2.10.12.10.1 or later
n8n-nodes-base
npm
Every version before 1.121.15; 2.0.0 up to, but not including, 2.9.1; 2.10.0 up to, but not including, 2.10.12.10.1 or later

Each maintained branch has its own fixed version. Stay on your branch if you cannot jump to the newest: n8n 1.123.22, 2.9.3, 2.10.1; n8n-nodes-base 1.121.15, 2.9.1, 2.10.1.

Am I affected?

Enter the version you run. Nothing you type is stored.

SecurityElites Developer Brief: the technical picture

Is it being attackedNo known attacks and no public attack code when CISA last reviewed it
Where the attacker must beAnywhere that can reach it over a network, including the internet if it is exposed
Account neededAn ordinary user account
Does a person have to do somethingNo. It works without anyone clicking or opening anything
How hard it is to doEasy. It works reliably once the attacker can reach it
Risk of: data being readHigh
Risk of: data or settings being changedHigh
Risk of: the service being taken downHigh
Can attackers automate it at scaleNo, according to CISA. Each target needs manual work
How much control an attacker gainsTotal control of the affected software, according to CISA

Read from the official severity rating: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Kind of coding mistake

  • CWE-89: database queries can be injected
  • CWE-94: code can be injected

If you cannot upgrade today

  • Restrict workflow creation and editing permissions in n8n to only fully trusted users until you can upgrade.
  • Disable the Merge node by setting the environment variable `NODES_EXCLUDE=n8n-nodes-base.merge`, then restart n8n. This prevents any use of the Merge node, including legitimate uses. This does not remediate the risk and should only be used

Signs it may already have been used against you

  • Examine n8n execution logs and workflow history for any Merge nodes created or modified by users who do not normally use that node.
  • Look for Merge node workflows with SQL query mode enabled, especially if they use dynamic SQL expressions or reference external data.
  • Check the filesystem for unexpected files created by the n8n process user (typically in /tmp, /home, or the n8n directory).
  • Review access logs of external systems that the n8n instance is configured to connect to for unusual queries or commands executed around the time an unauthorized workflow was created.

Log searches to start from

Find Merge node executions with SQL query mode (adapt field names to your environment)Splunk

sourcetype=n8n node_type=merge node_mode=sql | stats count by user, workflow_name, timestamp

Find unexpected files created by n8n process (adapt field names to your environment)Elastic

process.name:n8n AND event.action:file_create AND file.path:(/tmp/* OR /home/*)

Written with AI as a starting point. Review them and change the index and field names to match your own logs before you rely on the result.

SecurityElites Fix Guide: step by step

  1. Identify all n8n instances in your environmentList every server or container running n8n. Check your infrastructure tracking, container orchestration platform (such as Kubernetes), or deployment documentation. Record the hostname or IP address and current version of each.
  2. Check the current version of each n8n instanceLog in to each n8n instance and go to Settings > About or look at the version in the UI footer. Alternatively, SSH to the server and run `npm list n8n` in the n8n installation directory. Compare each version against the affected ranges: before 1.123.22, 2.0.0 to 2.9.2, or 2.10.0.
  3. Review workflow permissions and user accessList all users who have permission to create or modify workflows in each affected n8n instance. For each user, check whether they should have that permission. Document which users are trusted and which are not.
  4. Back up the n8n database and configurationExport or snapshot the database used by n8n (usually SQLite, PostgreSQL, or MySQL depending on your setup). Also back up any custom nodes or environment variable configuration. Store backups in a safe location separate from the n8n server.
  5. Upgrade to the fixed versionFor each affected instance, upgrade n8n to 1.123.22, 2.9.3, or 2.10.1 or later, depending on which release line you are on. Follow the official n8n upgrade documentation for your deployment method (npm, Docker, managed cloud, etc.).
  6. Restart the n8n service and verify it startsAfter upgrading, restart the n8n process or container. Wait for it to become available. Log in to the UI and confirm you can access your workflows and credentials.
  7. Review workflow history for signs of misuseCheck the n8n execution logs and workflow editor history for any workflows created or modified by untrusted users since the instance was deployed. Look for Merge nodes with SQL query mode enabled, especially any that appear unusual or were created by users who do not normally use that node. If found, review what those workflows did and what systems they connected to.
  8. Audit and rotate credentials if neededIf any unauthorized workflow was found, assume credentials stored in n8n may be compromised. Rotate API keys, passwords, and tokens for external systems that the n8n instance could access. Review access logs of those systems for unusual activity since the workflow was created.

How to confirm it is fixed: Log in to each n8n instance and confirm the version shown in Settings > About is 1.123.22, 2.9.3, 2.10.1, or later.

SecurityElites Quick Fixes: copy and paste

Upgrade n8n with npmupgrade

npm install n8n@2.10.1
npm ls n8n

Upgrade n8n-nodes-base with npmupgrade

npm install n8n-nodes-base@2.10.1
npm ls n8n-nodes-base

Check n8n version via npm (Linux/macOS/WSL)for this issue

cd /path/to/n8n && npm list n8n

Check n8n version in a Docker containerfor this issue

docker exec <container_name> npm list n8n

Temporarily disable Merge node (environment variable)for this issue

export NODES_EXCLUDE='n8n-nodes-base.merge'

Pass values as parameters (Python)general hardening

cur.execute("SELECT * FROM items WHERE id = %s", (item_id,))

Test in a non-production environment first. General hardening examples use placeholder names and ports; change them to match your setup.

Let your AI coding assistant do the upgrade

Paste this into the coding assistant you already use, inside the project. It checks first and asks before it changes anything.

Instruction for your coding assistant

You are helping me fix a security vulnerability (CVE-2026-27497) in this project.\n\n1. Search the whole repository, including lock files, container files and CI configuration, for these packages and list every place they are pinned or installed:\n   - n8n (npm): must be 2.10.1 or later
   - n8n-nodes-base (npm): must be 2.10.1 or later
2. Tell me which version we use now and whether it is affected. Stop and ask me before changing anything.
3. After I agree, raise each one to the safe version, update the lock files, and keep every other dependency as it is.
4. Run the tests and tell me what failed.
5. Give me a short summary of the files you changed that I can put in the pull request.

SecurityElites Incident Drill: could your team handle this?

Four questions to ask in your next team meeting. If any has no clear answer, that is the gap to close.

What versions of n8n are affected by this flaw?A good answer: Versions before 1.123.22, versions 2.0.0 through 2.9.2, and version 2.10.0 are affected; versions 1.123.22, 2.9.3, and 2.10.1 or later are fixed.
Who can exploit this flaw?A good answer: An authenticated user who has permission to create or modify workflows in n8n can exploit this flaw.
What can an attacker do if they exploit this flaw?A good answer: An attacker can run arbitrary code on the n8n server, write files to the filesystem, and potentially access credentials and data stored in or reachable from n8n.
What should we do if we find an unauthorized Merge node workflow in our n8n instance?A good answer: Immediately review what that workflow did, what systems it connected to, what data it accessed, rotate affected credentials and API keys, and check access logs of those systems for signs of compromise.

Run a full timed drill with your team

Ticket for your backlog

Paste into Jira, GitHub Issues or any tracker that reads Markdown.

Ready-made ticket

## n8n Merge node allows authenticated users to run code and write files (CVE-2026-27497)

**Severity:** Critical  |  **SE Fix-First Score:** 51/100  |  **Fix window:** Within 7 days
**Record:** SE-AIV-01845 https://securityelites.com/ai-vulnerabilities/cve-2026-27497-n8n-merge-node-allows-authenticated-users-to-run-code/

### Why this matters
An attacker with permission to create or edit workflows in n8n can run arbitrary code on the server and write files to it. This could lead to full compromise of the n8n server, theft of stored credentials and data, or use of the server to attack other systems.

### What to do
1. Identify all n8n instances in your environment
2. Check the current version of each n8n instance
3. Review workflow permissions and user access
4. Back up the n8n database and configuration
5. Upgrade to the fixed version
6. Restart the n8n service and verify it starts
7. Review workflow history for signs of misuse
8. Audit and rotate credentials if needed

Full steps: https://securityelites.com/ai-vulnerabilities/cve-2026-27497-n8n-merge-node-allows-authenticated-users-to-run-code/

### Done when
- [ ] n8n is at 2.10.1 or later everywhere it is installed
- [ ] n8n-nodes-base is at 2.10.1 or later everywhere it is installed
- [ ] Lock files, container images and CI configuration are updated
- [ ] Log in to each n8n instance and confirm the version shown in Settings > About is 1.123.22, 2.9.3, 2.10.1, or later.
- [ ] Logs were checked for signs of earlier use

SecurityElites Fix Tracker

Record who owns this fix, the date it is due and when it is done, and see everything still open in one list. Free with a SecurityElites account.

Sign in to track this fix

Change history

  • 25 Feb 2026: Made public
  • 2 Dec 2026: Published

Official record

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

Weakness type: CWE-89, CWE-94

Use this record in your own tools

Get this record as JSON

curl https://securityelites.com/wp-json/se-aivd/v1/vulns/CVE-2026-27497

For scanners and pipelines: OSV format · CycloneDX format · API guide · Email alerts · Fix tracker

The plain-language sections were written with AI from the official record, and the upgrade versions come directly from the official data. Last updated 2 Dec 2026. Read the vendor advisory before changing a production system.