CVE-2026-54301: n8n Webhook XSS Vulnerability Bypasses CSP (CVSS 5.4)
n8n, an open source workflow automation platform, contains a cross-site scripting (XSS) vulnerability in its Respond to Webhook node. An authenticated user with workflow edit permissions can configure the node to serve binary content with a malicious Content-Type header. Because the binary response path bypasses n8n's Content-Security-Policy protections, this allows arbitrary JavaScript to execute in the n8n web application origin—meaning attackers can access the authenticated user's session and credentials when that user visits a specially crafted public webhook URL. The vulnerability requires an authenticated attacker and user interaction, but the damage is confined to the victim's n8n account and the data it can access.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 5.4 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- Weaknesses (CWE)
- CWE-79
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-23 / 2026-06-26
NVD description (verbatim)
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.
1 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability stems from an incomplete Content-Security-Policy implementation. The Respond to Webhook node permits authenticated users to configure binary responses with attacker-controlled Content-Type headers. When a public webhook serves such a response to an authenticated n8n user, the browser treats the response according to the attacker's declared content type rather than the CSP sandbox. This allows embedded JavaScript to execute in the n8n origin, granting access to session cookies, stored credentials, and workflow data. The flaw affects versions prior to 1.123.55, 2.25.7, and 2.26.2 across all branches (1.x, 2.25.x, and 2.26.x).
Business impact
For organizations using n8n for business-critical workflow automation, this vulnerability creates an insider threat vector. A malicious employee with workflow edit access can set up a trap that compromises colleagues' n8n sessions when they visit a webhook link (potentially sent via email or chat). Session compromise allows theft or manipulation of workflows, credentials stored in n8n, and any data flowing through those workflows—including API keys, database credentials, and integration secrets. Self-hosted instances are equally at risk; public webhook URLs can be shared externally, making the attack surface potentially larger.
Affected systems
All n8n deployments (self-hosted and cloud-managed) running versions prior to 1.123.55 (1.x branch), 2.25.7 (2.25.x branch), or 2.26.2 (2.26.x branch) are affected. The vulnerability requires the attacker to possess workflow edit permissions, so it does not affect users with read-only or no workflow access. Organizations should inventory their n8n version and identify users with workflow edit capabilities.
Exploitability
Exploitation is moderately accessible. An attacker needs valid n8n credentials (workflow editor role) and knowledge of a public webhook URL, but the attack itself requires minimal sophistication—configuring a Respond to Webhook node with a malicious Content-Type is a straightforward UI operation. Victim interaction (visiting or being redirected to the webhook URL) is required, which can be achieved through social engineering, phishing, or embedding the link in a shared message. No public exploit code or active KEV listing indicates limited current weaponization, but the technique is well within the capability of motivated insiders or targeted threat actors.
Remediation
Immediately upgrade to n8n version 1.123.55, 2.25.7, or 2.26.2 or later, depending on your deployed branch. Verify the version by checking the n8n admin panel or logs. For self-hosted instances, consult your deployment method (Docker, Node.js, Kubernetes) and apply the update using the vendor's published release notes. Cloud-managed n8n instances may auto-update; verify with your instance provider.
Patch guidance
Review n8n's official release notes for versions 1.123.55, 2.25.7, and 2.26.2 to confirm the fix addresses CVE-2026-54301 and to identify any compatibility or breaking changes. Apply patches to non-production environments first to validate workflow functionality. For self-hosted instances using Docker, pull the latest image tag for your branch (e.g., 'latest', 'v2.26.2'). For Node.js deployments, use npm or your package manager to update the n8n package. Kubernetes users should update the n8n Helm chart or container image version. Schedule patching within the next 30 days to minimize exposure window; prioritize instances with many workflow editors or that process sensitive integrations.
Detection guidance
Monitor n8n logs for unusual Respond to Webhook node configurations, particularly those with suspicious Content-Type headers or binary response settings. Review workflow audit trails for creation or modification of public webhooks by users with questionable intent. Check browser console logs and n8n application logs for any JavaScript execution errors or unexpected cross-origin requests emanating from webhook responses. Consider deploying a WAF rule to flag or block HTTP responses from public n8n webhook endpoints that declare binary content-types inconsistent with their actual payload. Monitor session management logs for abnormal activity on accounts that may have visited attacker-controlled webhook URLs.
Why prioritize this
Although CVSS 5.4 ranks this as medium severity, insider threat potential and the ease of social engineering (sharing a webhook URL) elevate business risk. Organizations relying on n8n for sensitive integrations or with high numbers of workflow editors should treat this as high priority. Patching is low-friction (straightforward version upgrade) and should be completed within 30 days. Lower-risk environments (limited editor count, non-sensitive workloads, air-gapped instances) can extend timeline but should not delay beyond 60 days.
Risk score, explained
The CVSS 3.1 score of 5.4 (MEDIUM) reflects the network attack vector, low attack complexity, and the requirement for authenticated attacker credentials (PR:L) and user interaction (UI:R). Scope change (S:C) indicates the attacker can access resources beyond the authorized scope (the victim's session). However, integrity and confidentiality impacts are limited (I:L, C:L) because the attacker gains access to the victim's account and data rather than systemic compromise. Availability is not impacted (A:N). The score appropriately balances the moderate likelihood and moderate impact.
Frequently asked questions
Can an attacker without workflow edit permissions exploit this vulnerability?
No. The attacker must be an authenticated n8n user with workflow edit access in order to configure a malicious Respond to Webhook node. Users with read-only access or no workflow permissions are not at risk of being exploited in this way, though they could still be victimized if another editor sets the trap.
Does patching require downtime?
Depends on your deployment. Self-hosted instances using rolling updates (e.g., Kubernetes with multiple replicas) can patch with zero downtime. Docker and Node.js single-instance setups will experience a brief outage during the update. Cloud-managed instances may patch automatically with minimal or no downtime. Plan accordingly and test in a staging environment first.
Are webhook URLs public by default, and can they be discovered?
Webhook URLs are typically public-facing and can be discovered if shared or if the attacker crafts URLs based on webhook ID patterns. The vulnerability requires the victim to visit the URL, so attackers must induce that action through social engineering, phishing, or embedding the link in a trusted context. The webhook itself does not broadcast its existence; it only responds to direct requests.
What data is at risk if my session is compromised via this vulnerability?
An attacker who compromises your n8n session gains full access to your account, including all workflows you can view or edit, stored credentials (API keys, database passwords, integration tokens), execution logs, and any data flowing through those workflows. In effect, they inherit your permissions. Immediately change your n8n password and audit recent account activity if you suspect compromise.
This analysis is provided for informational purposes. Verify all version numbers, patch availability, and deployment-specific guidance against official n8n releases and documentation. This vulnerability was published on 2026-06-23; check for subsequent disclosures or updates. Self-hosted and cloud environments may have different update procedures; consult your system administrator or n8n support for deployment-specific guidance. No active exploit code or KEV listing is documented as of the publication date, but organizations should not rely on this for risk prioritization. Source: NVD (public-domain), retrieved 2026-07-28. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-54302MEDIUMn8n Chat Trigger Stored XSS Vulnerability
- CVE-2026-54303MEDIUMn8n Reflected XSS in Meta & Teams Triggers (v2.24.0 Fix)
- CVE-2016-20070MEDIUMPrivilege Escalation & Stored XSS in WordPress Booking Calendar Contact Form 1.0.23
- CVE-2018-25384MEDIUMStored XSS in Wikidforum 2.20 Allows Authenticated Attackers to Inject Malicious Scripts
- CVE-2019-25731MEDIUMStored XSS in Zuz Music 2.1 Contact Form
- CVE-2019-25737MEDIUMStored XSS in Live Chat Unlimited 2.8.3 – Admin Session Compromise
- CVE-2019-25739MEDIUMGigToDo 1.3 Stored XSS Vulnerability in Proposal Descriptions
- CVE-2019-25742MEDIUMStored XSS in Zoner Real Estate WordPress Theme 4.1.1 – Admin Account Compromise Risk