n8n workflow nodes can be chained to run commands on the server

CriticalSE Fix-First Score 51/100CVE-2026-27498SE-AIV-01846Remote code executionAI apps and chat interfacesMade public 26 Feb 2026

Download as PDF

What this means

An authenticated user who can create or change workflows could run any command on the n8n server. This means they could read all data stored there, change it, install malware, or shut down the service. If n8n runs with high privileges or can reach other systems, the attacker gains that access too.

SecurityElites Manager Brief: the decision in one minute

A person who can build workflows in n8n can trick the system into running their commands on the server. You need to upgrade n8n immediately, or restrict who can create workflows until you do.

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 or infrastructure team that runs n8n.
Likely effortAbout 15 minutes: download and deploy the fixed version, then restart n8n. It may take longer if you run n8n across multiple machines or in containers that need separate updates.

Questions to ask your team or supplier

  • Who in our team has permission to create and modify n8n workflows, and are all of them fully trusted?
  • Do we have an audit log or record of all workflows that use the Read/Write Files from Disk node, and have we reviewed them for unusual file operations?
  • What data or systems does n8n have access to from the host machine, and what would an attacker be able to do if they ran commands as the n8n process?

Message you can forward to the owning team

Security notice: n8n workflow nodes can be chained to run commands on the server (CVE-2026-27498)

Severity: Critical
SecurityElites Fix-First Score: 51 of 100
SecurityElites fix window: Within 7 days
Action: upgrade to n8n 2.2.0 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-27498-n8n-workflow-nodes-can-be-chained-to-run-commands/
Source: SecurityElites AI Vulnerabilities Database, record SE-AIV-01846

What is at stake in your AI setup

  • Credentials stored in n8n for external AI services or APIs: an attacker could steal API keys and use them to run up bills or access other systems.
  • Workflows and automations: an attacker could modify workflows to send data to external systems or disrupt critical processes.
  • Data processed by n8n workflows: any customer data, internal records, or files handled by workflows could be read or changed.

Map where your company uses AI

Who is exposed

  • n8n instances where users who are not fully trusted can create or modify workflows.
  • n8n running with read and write access to system files or configuration directories.
  • n8n deployments where the Read/Write Files from Disk node is enabled and git operations are possible.
  • n8n instances that can reach databases, APIs, or other systems from the host machine.

Upgrades you need

SoftwareAffected versionsMove to
n8n
npm
Every version before 1.123.8; 2.0.0 up to, but not including, 2.2.02.2.0 or later

Each maintained branch has its own fixed version. Stay on your branch if you cannot jump to the newest: n8n 1.123.8, 2.2.0.

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 doHard. It depends on conditions the attacker does not control
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:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H

Kind of coding mistake

  • CWE-94: code can be injected

If you cannot upgrade today

  • Until you upgrade, set the environment variable `NODES_EXCLUDE=n8n-nodes-base.readWriteFile` before starting n8n to disable the Read/Write Files from Disk node.
  • Restrict workflow creation and editing permissions to only fully trusted users in n8n's access control settings.
  • These are temporary steps only and do not fully prevent the attack; upgrade as soon as possible.

Signs it may already have been used against you

  • Search n8n workflow execution logs for any workflow that uses both the Read/Write Files from Disk node and git operations in the same workflow.
  • Look in n8n audit logs for workflows created or modified by users shortly before unexpected commands were run on the host.
  • Check system command-execution logs for commands spawned by the n8n process or user account that were not authorized.
  • Review changes to files in the n8n configuration directory or `.git` directories that coincide with workflow executions.

SecurityElites Fix Guide: step by step

  1. Find where n8n is installedCheck where n8n runs in your environment: on a single server, in containers, in Kubernetes, or in a cloud platform. Write down each location and the current version.
  2. Check the current n8n versionRun `npm list n8n` on each machine where n8n is installed, or check the version in the n8n web interface under Settings > About. Record whether each is below 1.123.8 or in the range 2.0.0 to 2.1.x (which are affected).
  3. Back up n8n data and settingsExport all workflows, credentials, and settings from n8n before upgrading. If n8n uses a database, make a full backup of that database.
  4. Upgrade n8n to the fixed versionIf running version 1.x, upgrade to 1.123.8 or later. If running version 2.x, upgrade to 2.2.0 or later. Follow your deployment method: for npm, use `npm install n8n@1.123.8` or `npm install n8n@2.2.0`; for Docker, pull and restart with the new image tag; for managed platforms, trigger an update through their interface.
  5. Restart n8n and verify it startsRestart the n8n service or container. Wait for it to fully start and check that the web interface responds and workflows can load.
  6. Confirm the version is fixedCheck that n8n now reports version 1.123.8 or later (1.x branch) or 2.2.0 or later (2.x branch) in Settings > About or via `npm list n8n`.
  7. Review workflow creation permissionsIn n8n settings, check who has permission to create and edit workflows. Remove access for users who do not need it, and ensure only trusted team members can build workflows.
  8. Check logs for suspicious activity before the upgradeReview n8n logs and audit records from before you upgraded for any workflows that wrote to system files or ran git operations. If any are found, investigate whether they were authorized.

How to confirm it is fixed: Confirm that n8n is running version 1.123.8 or later (for 1.x) or version 2.2.0 or later (for 2.x) by checking Settings > About or running `npm list n8n`.

SecurityElites Quick Fixes: copy and paste

Upgrade n8n with npmupgrade

npm install n8n@2.2.0
npm ls n8n

Check n8n version via npmfor this issue

npm list n8n

Disable Read/Write Files node as temporary mitigation (set before starting n8n)for this issue

export NODES_EXCLUDE=n8n-nodes-base.readWriteFile

Run the service in a locked-down containergeneral hardening

docker run --read-only --cap-drop ALL \
  --security-opt no-new-privileges --user 1000:1000 \
  -p 127.0.0.1:8080:8080 YOUR_IMAGE

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-27498) 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.2.0 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 is the minimum n8n version we need to upgrade to in order to fix this vulnerability?A good answer: If running version 1.x, upgrade to 1.123.8 or later; if running version 2.x, upgrade to 2.2.0 or later.
Who is at risk of using this vulnerability and what permissions do they need?A good answer: An authenticated user who has permission to create or modify workflows can chain the Read/Write Files from Disk node with git operations to run commands on the server.
What is a temporary step we can take right now if we cannot upgrade immediately?A good answer: Set the environment variable `NODES_EXCLUDE=n8n-nodes-base.readWriteFile` to disable the Read/Write Files from Disk node, and restrict workflow creation permissions to fully trusted users only.
What should we check in our logs to see if this vulnerability was exploited before we upgraded?A good answer: Look for workflows that use both the Read/Write Files from Disk node and git operations in the same workflow, and check system logs for unexpected commands run by the n8n process.

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 workflow nodes can be chained to run commands on the server (CVE-2026-27498)

**Severity:** Critical  |  **SE Fix-First Score:** 51/100  |  **Fix window:** Within 7 days
**Record:** SE-AIV-01846 https://securityelites.com/ai-vulnerabilities/cve-2026-27498-n8n-workflow-nodes-can-be-chained-to-run-commands/

### Why this matters
An authenticated user who can create or change workflows could run any command on the n8n server. This means they could read all data stored there, change it, install malware, or shut down the service. If n8n runs with high privileges or can reach other systems, the attacker gains that access too.

### What to do
1. Find where n8n is installed
2. Check the current n8n version
3. Back up n8n data and settings
4. Upgrade n8n to the fixed version
5. Restart n8n and verify it starts
6. Confirm the version is fixed
7. Review workflow creation permissions
8. Check logs for suspicious activity before the upgrade

Full steps: https://securityelites.com/ai-vulnerabilities/cve-2026-27498-n8n-workflow-nodes-can-be-chained-to-run-commands/

### Done when
- [ ] n8n is at 2.2.0 or later everywhere it is installed
- [ ] Lock files, container images and CI configuration are updated
- [ ] Confirm that n8n is running version 1.123.8 or later (for 1.x) or version 2.2.0 or later (for 2.x) by checking Settings > About or running `npm list n8n`.
- [ ] 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 chain the Read/Write Files from Disk node with git operations to achieve remote code execution. By writing to specific configuration files and then triggering a git operation, the attacker could execute arbitrary shell commands on the n8n host.## Patches The issue has been fixed in n8n versions 2.2.0 and 1.123.8. 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 Read/Write Files from Disk node by adding `n8n-nodes-base.readWriteFile` 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-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-27498

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.