CVE-2026-54301: n8n: Same-Origin XSS in Respond to Webhook Node
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 NODESEXCLUDE environment variable.
These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.
Other sources
n8n is an open source workflow automation platform. Prior to 1.123.55, 2.25.7, and 2.26.2, 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. This vulnerability is fixed in 1.123.55, 2.25.7, and 2.26.2.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/n8nto a version that resolves this vulnerability.Fixed in 2.25.7 - Upgrade
Upgrade
npm/n8nto a version that resolves this vulnerability.Fixed in 2.26.2 - Upgrade
Upgrade
npm/n8nto a version that resolves this vulnerability.Fixed in 1.123.55 - Upgrade
Upgrade
n8nto a version that resolves this vulnerability.Fixed in 1.123.55 - Upgrade
Upgrade
n8nto a version that resolves this vulnerability.Fixed in 2.25.7 - Upgrade
Upgrade
n8nto a version that resolves this vulnerability.Fixed in 2.26.2 - Configuration
Add `n8n-nodes-base.respondToWebhook` to the `NODES_EXCLUDE` environment variable to disable the Respond to Webhook node as a short-term mitigation (not a full remediation).
n8n (Respond to Webhook node) NODES_EXCLUDE = n8n-nodes-base.respondToWebhook - Compensating control
Limit workflow creation and editing permissions to fully trusted users only, so an authenticated user cannot configure a Respond to Webhook node to serve binary content with an attacker-controlled `Content-Type` (short-term mitigation).
Event History
Frequently Asked Questions
What is the severity of CVE-2026-54301?
CVE-2026-54301 has a severity rating of high, with a score of 7.6.
What is the primary risk associated with CVE-2026-54301?
The primary risk is that an authenticated user with workflow edit access can exploit the vulnerability to execute JavaScript in a sandboxed environment via a malicious webhook.
How do I fix CVE-2026-54301?
To fix CVE-2026-54301, ensure that workflows do not allow untrusted content types for webhook responses or apply proper input validation.
Who is affected by CVE-2026-54301?
CVE-2026-54301 affects users of the npm/n8n software who have granted workflow edit access to authenticated users.
What is the impact of CVE-2026-54301?
The impact of CVE-2026-54301 is the potential exploitation leading to cross-site scripting (XSS) attacks due to bypassed Content-Security-Policy headers.