n8n Chat Trigger allows injected JavaScript to run as a logged-in user

HighSE Fix-First Score 43/100CVE-2026-54302SE-AIV-01714Script injection in the browserAI data and pipelinesMade public 17 Jun 2026

Download as PDF

What this means

A person with permission to edit workflows can inject malicious code that runs in the browser when another logged-in user visits a chat link. This code runs with the visitor's n8n account privileges and can read their data, change settings, create new workflows, or take other actions they could do.

SecurityElites Manager Brief: the decision in one minute

An n8n user with edit rights can hide malicious code in a chat link that steals data or takes over accounts of anyone who clicks it. You need to upgrade n8n immediately or restrict who can edit workflows.

SecurityElites Fix-First Score43 of 100
Our own ranking of what to fix first. Real attacks count most, then the chance of attack, then severity.
SecurityElites fix windowWithin 30 days
High severity. This is our suggestion from common practice; your own policy comes first.
Who should own the fixPlatform or infrastructure team that manages n8n deployment.
Likely effortAbout 15 to 30 minutes: check which version you run, upgrade to the fixed version, and restart n8n. It may take longer if you have multiple n8n instances or if the upgrade requires other dependency changes.

Questions to ask your team or supplier

  • Who in your team has permission to create and edit n8n workflows, and do you trust all of them?
  • Have you reviewed the webhookId values in any Chat Trigger nodes to see if they look normal?
  • Do you have logs or monitoring in place to detect when workflows are modified or new Chat Triggers are created?

Message you can forward to the owning team

Security notice: n8n Chat Trigger allows injected JavaScript to run as a logged-in user (CVE-2026-54302)

Severity: High
SecurityElites Fix-First Score: 43 of 100
SecurityElites fix window: Within 30 days
Action: upgrade to n8n 2.26.2 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-54302-n8n-chat-trigger-allows-injected-javascript-to-run-as/
Source: SecurityElites AI Vulnerabilities Database, record SE-AIV-01714

What is at stake in your AI setup

  • Chat history and conversation data: injected code can read conversations between users and AI agents connected through the Chat Trigger.
  • Connected tools and system access: if the workflow connects to APIs, databases, or other systems, the attacker's code can abuse those connections using the victim's session.
  • Workflow definitions: injected code can read or modify the logic of workflows, including prompts, model choices, and tool configurations.

Map where your company uses AI

Who is exposed

  • n8n instances running any version before 1.123.55, or versions 2.0.0-rc.0 through 2.25.6, or 2.26.0 through 2.26.1.
  • Teams where users who are not fully trusted have permission to create or edit workflows.
  • Chat Trigger nodes that are exposed to external users or other team members.

Upgrades you need

SoftwareAffected versionsMove to
n8n
npm
Every version before 1.123.55; 2.26.0 up to, but not including, 2.26.2; 2.0.0-rc.0 up to, but not including, 2.25.72.26.2 or later

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

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 somethingYes. Someone has to click, open or approve something
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 changedLimited
Risk of: the service being taken downNone
Can attackers automate it at scaleNo, according to CISA. Each target needs manual work
How much control an attacker gainsPartial control, according to CISA

Read from the official severity rating: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N

Kind of coding mistake

  • CWE-79: script can be injected into a web page

If you cannot upgrade today

  • Until you upgrade, restrict workflow creation and edit permissions to only fully trusted users.
  • Disable the Chat Trigger node by adding `@n8n/n8n-nodes-langchain.chatTrigger` to the `NODES_EXCLUDE` environment variable and restart n8n. This stops the flaw from being used but also stops all chat triggers working.

Signs it may already have been used against you

  • Check n8n audit logs or database for new Chat Trigger nodes added during the time before you upgraded.
  • Look for Chat Trigger workflows with unusual or suspicious webhookId values.
  • Review browser console logs on client machines for unexpected JavaScript errors or network requests when users visit chat URLs.
  • Check n8n's database or logs for modifications to workflow definitions that you did not authorize.

SecurityElites Fix Guide: step by step

  1. Find the installed n8n versionLog in to your n8n instance. Go to Settings > About or check the version displayed in the top menu. Write down the exact version number.
  2. Check if your version is affectedIf your version is before 1.123.55, or is between 2.0.0-rc.0 and 2.25.6, or is between 2.26.0 and 2.26.1, you are affected. If your version is 1.123.55 or later, 2.25.7 or later, or 2.26.2 or later, you are fixed.
  3. Back up your n8n dataExport your workflows and credentials or take a backup of your database. This protects you in case the upgrade has unexpected effects.
  4. Upgrade n8n to a fixed versionUpgrade to version 1.123.55, 2.25.7, 2.26.2, or any later version. Follow your normal process to deploy the new version (npm update, Docker image pull, or package manager update).
  5. Restart n8nStop and start your n8n service to load the new code. Check that it starts without errors and that you can log in.
  6. Verify the fix is in placeLog in and check the version number again in Settings > About. It must be 1.123.55 or later, 2.25.7 or later, or 2.26.2 or later.
  7. Review workflow edit permissionsCheck who has permission to create and edit workflows. Remove these permissions from users who do not need them, or move untrusted users to a separate n8n instance.
  8. Check for signs the flaw was already usedReview the list of Chat Trigger nodes and any recent changes to workflows. Look for any unexpected webhookId values or new workflows created by users who do not normally create them. Check n8n logs for unusual activity around the time the instance was at risk.

How to confirm it is fixed: Log in to n8n and check that the version shown in Settings > About is 1.123.55 or later, 2.25.7 or later, or 2.26.2 or later.

SecurityElites Quick Fixes: copy and paste

Upgrade n8n with npmupgrade

npm install n8n@2.26.2
npm ls n8n

Check n8n version via npmfor this issue

npm list n8n

A starting content security policy (nginx)general hardening

add_header Content-Security-Policy "default-src 'self'; object-src 'none'; base-uri 'self'" always;

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-54302) 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.26.2 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 difference between the affected and fixed versions of n8n?A good answer: Affected versions before 1.123.55, 2.0.0-rc.0 through 2.25.6, and 2.26.0 through 2.26.1; fixed versions are 1.123.55 or later, 2.25.7 or later, and 2.26.2 or later.
What can an attacker do if they inject code into a Chat Trigger?A good answer: Their code runs in the browser of anyone who visits the chat URL while logged in to n8n, with that person's account privileges, allowing the attacker to read data or perform actions as that user.
Who can carry out this attack?A good answer: Only a person who already has permission to edit workflows in n8n; they inject the code into the webhookId field of a Chat Trigger node.
What should we do if we cannot upgrade immediately?A good answer: Limit workflow edit permissions to only fully trusted users, or disable the Chat Trigger node using the `NODES_EXCLUDE` environment variable until you can upgrade.

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 Chat Trigger allows injected JavaScript to run as a logged-in user (CVE-2026-54302)

**Severity:** High  |  **SE Fix-First Score:** 43/100  |  **Fix window:** Within 30 days
**Record:** SE-AIV-01714 https://securityelites.com/ai-vulnerabilities/cve-2026-54302-n8n-chat-trigger-allows-injected-javascript-to-run-as/

### Why this matters
A person with permission to edit workflows can inject malicious code that runs in the browser when another logged-in user visits a chat link. This code runs with the visitor's n8n account privileges and can read their data, change settings, create new workflows, or take other actions they could do.

### What to do
1. Find the installed n8n version
2. Check if your version is affected
3. Back up your n8n data
4. Upgrade n8n to a fixed version
5. Restart n8n
6. Verify the fix is in place
7. Review workflow edit permissions
8. Check for signs the flaw was already used

Full steps: https://securityelites.com/ai-vulnerabilities/cve-2026-54302-n8n-chat-trigger-allows-injected-javascript-to-run-as/

### Done when
- [ ] n8n is at 2.26.2 or later everywhere it is installed
- [ ] Lock files, container images and CI configuration are updated
- [ ] Log in to n8n and check that the version shown in Settings > About is 1.123.55 or later, 2.25.7 or later, or 2.26.2 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

  • 16 Jun 2026: Made public
  • 2 Dec 2026: Published

Official record

## Impact An authenticated user with workflow edit access could inject arbitrary JavaScript into the Chat Trigger's generated page by setting a malicious `webhookId`. When a logged-in user visited the chat URL, the injected code executed in the n8n origin with that user's session privileges.## Patches The issue has been fixed in n8n versions 1.123.55, 2.25.7, and 2.26.2. 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 Chat Trigger node by adding `@n8n/n8n-nodes-langchain.chatTrigger` 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-79

Use this record in your own tools

Get this record as JSON

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

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 3 Dec 2026. Read the vendor advisory before changing a production system.