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

CVE-2026-42232: n8n has XML Node Prototype Pollution that to RCE

criticalCVSS 4.0 9.4 · 3.1 9.9GHSA-hqr4-h3xv-9m3r

n8n's XML node can be used to pollute the global JavaScript prototype, which other nodes can then turn into remote code execution. It needs an account that can create or modify workflows. Fixed in n8n 1.123.32, 2.17.4 and 2.18.1. You can also disable the node with NODES_EXCLUDE.

Published Apr 29, 2026 · Updated May 8, 2026 · Analysis Oct 28, 2026

What an attacker can do

The XML node (n8n-nodes-base.xml) lets a workflow author trigger global prototype pollution (CWE-1321). The change affects every object in the n8n process. The advisory says this leads to RCE when combined with other nodes that exploit the pollution. It does not name those nodes.

The attacker needs a user account with permission to create or modify workflows. That is common on shared instances: teams give many staff editor rights. With it, they build a workflow with an XML node, then a second node that reads the polluted properties and ends in command execution. The CVSS 3.1 vector shows the scope changing (S:C), because the effect leaves the workflow sandbox and reaches the host.

Once code runs as the n8n user, it can read all stored credentials, including API keys for AI providers and SaaS tools, the database and environment variables. Instances where everyone with editor rights is fully trusted are at lower risk, but not safe.

Who is affected

The npm package n8n below 1.123.32, 2.17.x below 2.17.4, and 2.18.0. The instance must have the XML node available and users with workflow edit rights.

npm ls n8n

For Docker, check the image tag.

n8n

Ecosystem
npm
Affected
>= 2.18.0, < 2.18.1
Fixed in
2.18.1
Check
npm ls n8n

n8n

Ecosystem
npm
Affected
>= 2.17.0, < 2.17.4
Fixed in
2.17.4
Check
npm ls n8n

n8n

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

How to fix it

Upgrade to n8n 1.123.32, 2.17.4 or 2.18.1, or later.

Temporary mitigations from the advisory (they do not fully remediate): limit workflow creation and editing to fully trusted users, and disable the XML node by adding n8n-nodes-base.xml to the NODES_EXCLUDE environment variable:

NODES_EXCLUDE='["n8n-nodes-base.xml"]'

How to tell if you were hit

List workflows that contain an XML node and review who last edited them and when. Look for workflows that pair the XML node with Code, Execute Command, Git or SSH nodes. In execution data, look for __proto__ or constructor keys in XML-derived output. On the host, check n8n child processes for commands nobody configured.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

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.

Credited to simonkoeck.

Questions

Can I block this without upgrading?

Partly. Add n8n-nodes-base.xml to NODES_EXCLUDE and limit who can edit workflows. The advisory says this does not fully remediate it.

Does the attacker need a login?

Yes. The CVSS vector has low privileges: a user who can create or modify workflows.

How does this differ from the XML webhook body flaw?

That one triggers through xml2js in the webhook handler. This one goes through the XML node. Both are fixed in the same releases.

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