n8n XML node remote code execution via workflow modification
What this means
An attacker with permission to create or edit workflows in n8n can run arbitrary code on the server hosting n8n. This allows them to steal data, modify workflows, disrupt service, or use the server to attack other systems.
SecurityElites Manager Brief: the decision in one minute
A person with workflow editing rights can run code on your n8n server and steal data or compromise connected systems. Upgrade immediately to 1.123.43, 2.20.7, or 2.22.1. If you cannot upgrade today, restrict who can edit workflows.
| SecurityElites Fix-First Score | 51 of 100 Our own ranking of what to fix first. Real attacks count most, then the chance of attack, then severity. |
|---|---|
| SecurityElites fix window | Within 7 days Critical severity. This is our suggestion from common practice; your own policy comes first. |
| Who should own the fix | Platform engineering or DevOps team (whoever manages n8n deployment). |
| Likely effort | About 30 minutes: check your n8n version, upgrade to the fixed version, restart n8n, and verify the new version is running. Longer if you run n8n in a container or Kubernetes cluster, or if you have multiple n8n instances. |
Questions to ask your team or supplier
- Who in your organization has permission to create and edit n8n workflows, and are they all fully trusted to do so?
- Do you have activity logs for n8n workflows, and can you review them to detect whether this vulnerability was used to create suspicious workflows?
Message you can forward to the owning team
Security notice: n8n XML node remote code execution via workflow modification (CVE-2026-44791)
Severity: Critical
SecurityElites Fix-First Score: 51 of 100
SecurityElites fix window: Within 7 days
Action: upgrade to n8n 2.22.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-44791-n8n-xml-node-remote-code-execution-via-workflow-modification/
Source: SecurityElites AI Vulnerabilities Database, record SE-AIV-01844What is at stake in your AI setup
- Keys for external AI providers or APIs: an attacker can steal API keys and credentials stored in n8n workflows.
- Workflow definitions and data: an attacker can read, modify, or delete all workflows and associated data stored in n8n.
- Connected tools and systems: an attacker can use n8n's connections to compromise databases, cloud services, and other integrated systems.
- Credentials and secrets: an attacker can access all stored credentials and authentication tokens for systems n8n is connected to.
Who is exposed
- Teams that run n8n version 1.123.42 or earlier in the 1.x line.
- Teams that run n8n version 2.0.0-rc.0 through 2.20.6.
- Teams that run n8n version 2.21.0 through 2.22.0.
- Any n8n instance where non-admin users can create or edit workflows.
Upgrades you need
| Software | Affected versions | Move to |
|---|---|---|
| n8n npm | Every version before 1.123.43; 2.21.0 up to, but not including, 2.22.1; 2.0.0-rc.0 up to, but not including, 2.20.7 | 2.22.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.43, 2.20.7, 2.22.1.
Am I affected?
Enter the version you run. Nothing you type is stored.
SecurityElites Developer Brief: the technical picture
| Is it being attacked | No known attacks and no public attack code when CISA last reviewed it |
|---|---|
| Where the attacker must be | Anywhere that can reach it over a network, including the internet if it is exposed |
| Account needed | An ordinary user account |
| Does a person have to do something | No. It works without anyone clicking or opening anything |
| How hard it is to do | Easy. It works reliably once the attacker can reach it |
| Risk of: data being read | High |
| Risk of: data or settings being changed | High |
| Risk of: the service being taken down | High |
| Can attackers automate it at scale | No, according to CISA. Each target needs manual work |
| How much control an attacker gains | Total 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
- Immediately restrict workflow creation and editing permissions to only fully trusted administrators until you can upgrade.
- Disable the XML node by setting the environment variable `NODES_EXCLUDE=n8n-nodes-base.xml` and restarting n8n. This blocks the vulnerable node but may break workflows that depend on it.
- These steps reduce risk but do not fully fix the vulnerability. Upgrade to a patched version as soon as possible.
Signs it may already have been used against you
- Review n8n workflow editor audit logs for new or modified workflows created by non-admin users while the server was running an affected version.
- Search system logs and process monitor records for unexpected child processes spawned by the n8n process, or unusual network connections from the n8n server.
- Check n8n workflow definitions for XML nodes combined with Code nodes or nodes that execute shell commands; these combinations could indicate an attempt to exploit this vulnerability.
Log searches to start from
Find unexpected workflows created or modified by non-admin users (field names must be adapted to your n8n logging setup)Splunk
index=n8n source=*n8n* event=workflow action=create OR action=update user!=admin | stats count by user, workflow_id, timestampFind unexpected child processes spawned by n8n (field names must be adapted to your process logging setup)Elastic
process.parent.name:n8n AND process.name:(bash OR sh OR powershell OR cmd) | stats count by process.name, process.command_line, process.parent.pidWritten 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
- Find your n8n versionLog in to n8n as an admin. Go to Settings (gear icon) > About. Write down the version number shown.
- Check if your version is affectedIf your version is 1.123.42 or earlier, 2.0.0-rc.0 to 2.20.6, or 2.21.0 to 2.22.0, you are affected. If your version is 1.123.43, 2.20.7, 2.22.1 or later, you are not affected.
- Review who can edit workflowsIn n8n, go to Settings > Users and Roles. Check which users have permission to create or modify workflows. Document who they are. Consider whether all of them are fully trusted.
- Back up your n8n dataExport or snapshot your n8n database and all workflow definitions. This protects you if the upgrade fails and you need to roll back.
- Upgrade n8n to a fixed versionIf you use npm, run `npm install -g n8n@1.123.43` or `npm install -g n8n@2.22.1` or `npm install -g n8n@2.20.7` depending on your version line. If you use Docker, update your image tag to `n8n:1.123.43`, `n8n:2.22.1`, or `n8n:2.20.7`. Restart n8n after the upgrade.
- Verify the upgrade workedLog in to n8n and check Settings > About to confirm the version number has changed to the fixed version (1.123.43, 2.20.7, or 2.22.1 or later). Confirm that workflows load normally and you can execute a test workflow.
- Check if the vulnerability was exploitedReview n8n activity logs for unexpected workflows created or modified by users, especially those containing XML nodes or unusual combinations of nodes. Check server system logs for unexpected process execution or connections at the time the server was vulnerable.
- Review and restrict workflow permissionsConsider whether all users who can edit workflows are fully trusted. If not, limit workflow creation and editing to a smaller group of trusted users only.
How to confirm it is fixed: Log in to n8n and confirm in Settings > About that the version is 1.123.43, 2.20.7, 2.22.1, or later.
SecurityElites Quick Fixes: copy and paste
Upgrade n8n with npmupgrade
npm install n8n@2.22.1
npm ls n8nCheck n8n version via npmfor this issue
npm list -g n8n | grep n8nCheck n8n version in Docker containerfor this issue
docker exec <container-name> n8n --versionDisable XML node as temporary workaround (Docker environment variable)for this issue
NODES_EXCLUDE=n8n-nodes-base.xmlRun 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_IMAGETest 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-44791) 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.22.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.
Ticket for your backlog
Paste into Jira, GitHub Issues or any tracker that reads Markdown.
Ready-made ticket
## n8n XML node remote code execution via workflow modification (CVE-2026-44791)
**Severity:** Critical | **SE Fix-First Score:** 51/100 | **Fix window:** Within 7 days
**Record:** SE-AIV-01844 https://securityelites.com/ai-vulnerabilities/cve-2026-44791-n8n-xml-node-remote-code-execution-via-workflow-modification/
### Why this matters
An attacker with permission to create or edit workflows in n8n can run arbitrary code on the server hosting n8n. This allows them to steal data, modify workflows, disrupt service, or use the server to attack other systems.
### What to do
1. Find your n8n version
2. Check if your version is affected
3. Review who can edit workflows
4. Back up your n8n data
5. Upgrade n8n to a fixed version
6. Verify the upgrade worked
7. Check if the vulnerability was exploited
8. Review and restrict workflow permissions
Full steps: https://securityelites.com/ai-vulnerabilities/cve-2026-44791-n8n-xml-node-remote-code-execution-via-workflow-modification/
### Done when
- [ ] n8n is at 2.22.1 or later everywhere it is installed
- [ ] Lock files, container images and CI configuration are updated
- [ ] Log in to n8n and confirm in Settings > About that the version is 1.123.43, 2.20.7, 2.22.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.
Related vulnerabilities
In the same software
- n8n legacy expression engine allows code execution via JSON.stringify override High · CVE-2026-86083
- n8n OpenAI node bypasses domain restrictions on model search High · CVE-2026-86082
- n8n Git node can freeze the instance with a crafted path High · CVE-2026-86081
- n8n OAuth registration accepts unlimited field sizes, filling the database High · CVE-2026-86075
- n8n expression compiler can run arbitrary code through class field names High · CVE-2026-86076
- n8n Edit Fields node can crash the whole instance with a bad field name High · CVE-2026-72749
The same kind of mistake in other AI tools
- Langflow OSS allows arbitrary code execution through tool listing without admin check High · CVE-2026-128876
- Langflow OSS can run arbitrary code via tool-call interface before admin check High · CVE-2026-128867
- Langflow OSS allows remote code execution through improper code handling High · CVE-2026-127065
- Langflow OSS allows authenticated users to run arbitrary code High · CVE-2026-122088
- Langflow OSS allows authenticated users to run any command on the server High · CVE-2026-120601
Change history
- 14 May 2026: Made public
- 2 Dec 2026: Published
Official record
## Impact An authenticated user with permission to create or modify workflows could bypass the patch for GHSA-hqr4-h3xv-9m3r in the XML node. When combined with other nodes, this could lead to RCE on the n8n host.## Patches The issue has been fixed in n8n versions 1.123.43, 2.20.7, and 2.22.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.--- 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
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-44791For 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.