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

CVE-2026-54301: n8n: Same-Origin XSS in Respond to Webhook Node

highCVSS 4.0 7.0 · 3.1 7.6GHSA-v733-mwr6-fgcm

In n8n, a user with workflow edit access can set a Respond to Webhook node to return binary content with an attacker-chosen Content-Type. That path skips the Content-Security-Policy sandbox header, so a public webhook URL can run JavaScript in the n8n origin when a logged-in user opens it. Fixed in 1.123.55, 2.25.7 and 2.26.2.

Published Jun 16, 2026 · Updated Jul 20, 2026 · Analysis Oct 26, 2026

What an attacker can do

n8n normally adds a Content-Security-Policy sandbox header to webhook responses so that attacker-written HTML cannot act as the n8n site. The binary response path of the Respond to Webhook node did not get that header. An editor could therefore configure the node to serve binary data typed as text/html, and the browser would run its scripts in the same origin as the n8n editor (CWE-79).

The attack needs two people: an attacker with workflow edit access, and a victim who is signed in to n8n and opens the attacker's public webhook URL. The script then runs with that user's session. The attacker can call the n8n API as the victim, read credentials and workflow data the victim can see, or change workflows. If the victim is an instance owner or admin, the attacker moves from editor rights to full control. The CVSS scope is marked changed for that reason.

Teams where several people edit workflows, or where editors have lower trust than admins, are the exposed group.

Who is affected

n8n on npm in these ranges: below 1.123.55; from 2.0.0-rc.0 below 2.25.7; and from 2.26.0 below 2.26.2. Any instance that allows workflow editing and uses the Respond to Webhook node is in scope. Check:

npm ls n8n
n8n --version

Docker and cloud installs show the version in the n8n UI.

n8n

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

n8n

Ecosystem
npm
Affected
>= 2.26.0, < 2.26.2
Fixed in
2.26.2
Check
npm ls n8n

n8n

Ecosystem
npm
Affected
>= 2.0.0-rc.0, < 2.25.7
Fixed in
2.25.7
Check
npm ls n8n

How to fix it

Upgrade to 1.123.55, 2.25.7 or 2.26.2, or later:

npm install -g n8n@latest

For Docker, pull a newer n8nio/n8n image. Temporary mitigations from the advisory, which do not fully remove the risk: limit workflow creation and editing to fully trusted users, and disable the node by adding n8n-nodes-base.respondToWebhook to the NODES_EXCLUDE environment variable.

How to tell if you were hit

The advisory lists no indicators. Review every workflow that contains a Respond to Webhook node for a binary response with a Content-Type of text/html or another active type, and check who edited it last. In webhook access logs, look for hits on those paths just before unexpected API calls made with an admin's session, such as new credentials, API keys or user accounts. Check the n8n user list for accounts or roles you did not create.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Impact

An authenticated user with workflow edit access could configure a Respond to Webhook node to serve binary content with an attacker-controlled Content-Type. The binary response path bypassed the central Content-Security-Policy sandbox header, allowing a public webhook to execute JavaScript in the n8n origin when visited by an authenticated user, with access to that user's session.

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 Respond to Webhook node by adding n8n-nodes-base.respondToWebhook 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 supperhellokitty20.

Questions

Does CVE-2026-54301 need user interaction?

Yes. A signed-in n8n user must visit the attacker's public webhook URL. The attacker also needs workflow edit access.

Which versions fix it?

1.123.55, 2.25.7 and 2.26.2, or later releases.

Can I mitigate it without upgrading?

Partly. Restrict workflow editing to trusted users, or add n8n-nodes-base.respondToWebhook to NODES_EXCLUDE. The advisory says neither fully removes the risk.

Is it exploited in the wild?

The sources do not report exploitation, and the entry has no CISA KEV data.

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