n8n XML Node allows authenticated users to run arbitrary code

CriticalSE Fix-First Score 51/100CVE-2026-42232SE-AIV-01783Remote code executionAI apps and chat interfacesMade public 30 Apr 2026

Download as PDF

What this means

An attacker with permission to create or change workflows in n8n can run any code on the server. This means they can read all data n8n can access, change workflow settings, steal API keys, or take over other accounts that use n8n.

SecurityElites Manager Brief: the decision in one minute

A person who can build workflows in n8n can run code anywhere the n8n server runs. You need to upgrade n8n immediately and check who has had workflow-creation access since your current version was deployed.

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 30 minutes: update n8n to the fixed version and restart the service. If you have many n8n instances, it could take longer. Checking who changed workflows before the fix takes more time depending on your audit logs.

Questions to ask your team or supplier

  • Who in your organization can create or edit n8n workflows, and are all of them fully trusted?
  • Do you have audit logs enabled for n8n, and have you reviewed them for any suspicious workflow changes since your current version was deployed?

Message you can forward to the owning team

Security notice: n8n XML Node allows authenticated users to run arbitrary code (CVE-2026-42232)

Severity: Critical
SecurityElites Fix-First Score: 51 of 100
SecurityElites fix window: Within 7 days
Action: upgrade to n8n 2.18.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-42232-n8n-xml-node-allows-authenticated-users-to-run-arbitrary/
Source: SecurityElites AI Vulnerabilities Database, record SE-AIV-01783

What is at stake in your AI setup

  • API keys and credentials stored in n8n: an attacker can steal keys for AI services, cloud platforms, and databases.
  • Workflows and their configuration: an attacker can read, modify, or delete all workflow logic and settings.
  • Data processed by workflows: any personal data, business data, or model outputs that pass through n8n can be read or stolen.

Map where your company uses AI

Who is exposed

  • Teams with n8n version 1.123.31 or older, 2.17.0 to 2.17.3, or 2.18.0.
  • Any n8n user who can create or edit workflows.
  • Services and data sources that n8n connects to (databases, APIs, cloud services).

Upgrades you need

SoftwareAffected versionsMove to
n8n
npm
2.18.0 up to, but not including, 2.18.1; 2.17.0 up to, but not including, 2.17.4; Every version before 1.123.322.18.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.32, 2.17.4, 2.18.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:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Kind of coding mistake

  • CWE-1321: object prototypes can be polluted

If you cannot upgrade today

  • Until you can upgrade, restrict workflow creation and editing to only fully trusted users by changing user roles in Settings > Users.
  • Disable the XML node by setting the environment variable `NODES_EXCLUDE=n8n-nodes-base.xml` and restarting n8n. This protects you but may break workflows that depend on the XML node.

Signs it may already have been used against you

  • n8n audit logs: look for workflows created or edited by users who normally do not modify workflows.
  • n8n audit logs: look for the XML node being added to workflows for the first time.
  • n8n workflow history: search for workflows that use both the XML node and the Function node or other code-execution nodes.
  • Server process logs: look for unexpected child processes spawned by the n8n server process around the time workflows were created.

SecurityElites Fix Guide: step by step

  1. Find your n8n versionLog in to n8n. Click the question mark icon in the bottom left, then click "About". Write down the version number shown.
  2. Check if you are affectedIf your version is 1.123.31 or older, any version from 2.17.0 to 2.17.3, or version 2.18.0, you are affected. All other versions are safe.
  3. List users with workflow permissionsIn n8n, go to Settings, then Users. Note everyone who has permission to create or edit workflows. These people could potentially have used this weakness already.
  4. Back up your n8n dataBefore upgrading, follow n8n's official backup guide to save your database, workflows, and credentials. This protects you if something goes wrong during the upgrade.
  5. Upgrade n8n to the fixed versionIf you use version 1.x, upgrade to 1.123.32 or later. If you use 2.17.x, upgrade to 2.17.4 or later. If you use 2.18.0, upgrade to 2.18.1 or later. Follow n8n's official upgrade steps for your deployment method.
  6. Restart n8nAfter the upgrade finishes, restart the n8n service. Wait for it to fully start before continuing.
  7. Verify the fix is in placeConfirm it shows 1.123.32 or later, 2.17.4 or later, or 2.18.1 or later.
  8. Check for signs of past misuseReview your n8n audit logs and workflow history since your oldest unpatched version was running. Look for workflows created or changed by unexpected users, workflows that make HTTP requests to external servers, or workflows that run code using the Function node.

How to confirm it is fixed: Log in to n8n and check the version in the About section to confirm it is 1.123.32 or later, 2.17.4 or later, or 2.18.1 or later.

SecurityElites Quick Fixes: copy and paste

Upgrade n8n with npmupgrade

npm install n8n@2.18.1
npm ls n8n

Check n8n version from the command line (Docker)for this issue

docker exec <n8n_container_name> n8n --version

Check n8n version from the command line (npm)for this issue

npm list n8n

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-42232) 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.18.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 version of n8n are we running and is it affected by this weakness?A good answer: We checked the About section and confirmed we are running version X, which is [affected / not affected] by this issue.
What is the first step we should take to fix this?A good answer: We should back up our n8n database and workflows before we upgrade to prevent data loss.
If we cannot upgrade immediately, what can we do to reduce the risk?A good answer: We can disable the XML node by setting NODES_EXCLUDE and restrict workflow editing to only fully trusted users.
How would we know if someone has used this weakness to attack us?A good answer: We would look for unexpected workflows with the XML node and code-execution nodes, or audit log entries showing unusual users creating or changing workflows.

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 XML Node allows authenticated users to run arbitrary code (CVE-2026-42232)

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

### Why this matters
An attacker with permission to create or change workflows in n8n can run any code on the server. This means they can read all data n8n can access, change workflow settings, steal API keys, or take over other accounts that use n8n.

### What to do
1. Find your n8n version
2. Check if you are affected
3. List users with workflow permissions
4. Back up your n8n data
5. Upgrade n8n to the fixed version
6. Restart n8n
7. Verify the fix is in place
8. Check for signs of past misuse

Full steps: https://securityelites.com/ai-vulnerabilities/cve-2026-42232-n8n-xml-node-allows-authenticated-users-to-run-arbitrary/

### Done when
- [ ] n8n is at 2.18.1 or later everywhere it is installed
- [ ] Lock files, container images and CI configuration are updated
- [ ] Log in to n8n and check the version in the About section to confirm it is 1.123.32 or later, 2.17.4 or later, or 2.18.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

  • 29 Apr 2026: Made public
  • 2 Dec 2026: Published

Official record

## Impact An authenticated user with permission to create or modify workflows could achieve global prototype pollution via the XML Node leading to RCE when combined with other nodes exploiting the prototype pollution.## Patches The issue has been fixed in n8n versions 1.123.32, 2.17.4, and 2.18.1. 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 XML node by adding `n8n-nodes-base.xml` 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-1321

Use this record in your own tools

Get this record as JSON

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

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.