CVE-2025-61914 Overview
CVE-2025-61914 is a stored Cross-Site Scripting (XSS) vulnerability [CWE-79] in n8n, an open source workflow automation platform. The flaw affects versions prior to 1.114.0 and resides in the Respond to Webhook node. When this node returns HTML content containing executable scripts, the payload executes in the top-level window rather than inside the sandbox introduced in version 1.103.0. An attacker with workflow creation permissions can run arbitrary JavaScript in the context of the n8n editor interface. The maintainers patched the issue in version 1.114.0.
Critical Impact
An authenticated user with workflow creation rights can execute arbitrary JavaScript in another user's n8n editor session, potentially leading to session theft, workflow tampering, or credential exposure.
Affected Products
- n8n versions prior to 1.114.0
- Deployments using the Respond to Webhook node with HTML responses
- Self-hosted and cloud n8n installations running Node.js
Discovery Timeline
- 2025-12-26 - CVE-2025-61914 published to NVD
- 2026-10-13 - Last updated in NVD database
Technical Details for CVE-2025-61914
Vulnerability Analysis
The vulnerability stems from improper rendering context in the Respond to Webhook node. In version 1.103.0, n8n introduced a sandbox designed to isolate HTML responses rendered inside the editor interface. The Respond to Webhook node bypasses this sandbox when returning HTML content. Script tags and inline event handlers in the response body execute in the top-level window of the n8n editor instead of inside the isolated frame.
An attacker with permission to create or modify workflows can craft a webhook that responds with malicious HTML. When another user triggers or previews this webhook from the editor, the injected JavaScript runs with that user's session context. The attacker can then read workflow data, exfiltrate stored credentials accessible to the victim, or pivot to administrative functions.
The issue requires low privileges and user interaction, and the scope is changed because the executed script crosses the sandbox boundary into the editor origin.
Root Cause
The root cause is a missing output sanitization and sandbox enforcement gap in the Respond to Webhook node's HTML response handler. The sandbox added in 1.103.0 was not applied to responses produced by this specific node, allowing HTML to be rendered directly in the editor's top-level document.
Attack Vector
Exploitation requires network access to the n8n instance and an authenticated account with workflow creation privileges. The attacker builds a workflow where the Respond to Webhook node returns an HTML payload containing JavaScript. When a victim user interacts with the webhook output in the editor, the payload executes in their browser session under the n8n origin.
No verified public proof-of-concept code is available. See the GitHub Security Advisory GHSA-58jc-rcg5-95f3 for maintainer details.
Detection Methods for CVE-2025-61914
Indicators of Compromise
- Workflows containing Respond to Webhook nodes that return text/html responses with <script> tags or inline event handlers such as onerror or onload.
- Unexpected outbound requests from n8n editor browser sessions to attacker-controlled domains.
- New or modified workflows created by non-administrative users that produce HTML output.
Detection Strategies
- Audit the n8n workflow database for Respond to Webhook nodes with responseMode returning HTML and inspect the content for script payloads.
- Monitor browser DOM events and Content Security Policy (CSP) violation reports from the n8n editor origin.
- Review n8n audit logs for workflow create and update events performed by non-trusted accounts.
Monitoring Recommendations
- Enable and forward n8n application logs and reverse proxy access logs to a centralized logging platform for correlation.
- Alert on executions of webhooks that return HTML responses with embedded scripts.
- Track user accounts granted workflow creation permissions and alert on privilege changes.
How to Mitigate CVE-2025-61914
Immediate Actions Required
- Upgrade n8n to version 1.114.0 or later across all self-hosted and container deployments.
- Review existing workflows for Respond to Webhook nodes returning HTML and remove or sanitize untrusted content.
- Restrict workflow creation and modification permissions to trusted administrators only.
Patch Information
The vulnerability is patched in n8n version 1.114.0. The fix enforces the sandbox originally introduced in 1.103.0 on HTML responses produced by the Respond to Webhook node. Refer to the GitHub Security Advisory GHSA-58jc-rcg5-95f3 for complete patch details.
Workarounds
- Limit workflow creation and editing privileges to a small set of trusted users.
- Avoid returning untrusted or user-controlled HTML from the Respond to Webhook node.
- Deploy an external reverse proxy or HTML sanitizer that strips <script> tags and inline event handlers from n8n webhook responses.
# Upgrade n8n via npm
npm install -g n8n@1.114.0
# Or upgrade the Docker image
docker pull n8nio/n8n:1.114.0
docker stop n8n && docker rm n8n
docker run -d --name n8n -p 5678:5678 n8nio/n8n:1.114.0
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

