CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-65597

CVE-2026-65597: DOM-based Cross-Site Scripting (XSS) in n8n HTML Preview

Alon Barad
Alon Barad
Software Engineer

Jul 22, 2026·5 min read·5 visits

Executive Summary (TL;DR)

Unsandboxed iframe and sanitizer bypass in n8n's HTML preview allow low-privileged users to execute arbitrary JavaScript in the victim's session context, leading to session hijacking.

A critical DOM-based Cross-Site Scripting (XSS) vulnerability exists in n8n's workflow editor HTML preview component. By failing to include a sandbox attribute on the iframe used to display node execution output, n8n allowed rendered execution outputs to run arbitrary JavaScript within the same-origin context of the editor parent window. This vulnerability can be exploited by an attacker with low-privileged ('global:member') access to hijack an authenticated administrator's session and perform unauthorized API actions.

Vulnerability Overview

n8n is an extensible workflow automation platform that allows users to build complex integrations and data processing pipelines. A key feature of the n8n workflow editor is the ability to view the execution output of specific nodes in an HTML format directly within the user interface. This feature is intended to display rich representations of HTTP responses, parsed data, or custom code outputs.\n\nThe HTML preview functionality is implemented on the frontend to present content to the user in a styled layout. To prevent the rendered output's styling and structure from interfering with the parent application's layout, n8n developers embedded the output within an HTML iframe element. This design choice, however, introduced a significant security boundary that was not properly restricted.\n\nBecause the iframe is populated dynamically using the 'srcdoc' attribute, it inherits the origin of the parent page. Without proper sandboxing or strict execution controls, any active content within the iframe runs in the same origin as the n8n editor, creating an avenue for DOM-based Cross-Site Scripting (XSS).

Root Cause Analysis

The underlying vulnerability stems from the omission of the 'sandbox' attribute on the iframe container used to render the preview. In modern web browsers, iframes loaded via the 'srcdoc' attribute inherit the origin of their parent document unless they are explicitly restricted. This default browser behavior means that the iframe and the parent editor window share the same execution origin, enabling full DOM access across the boundary.\n\nWhile n8n attempted to neutralize malicious content by running user-supplied HTML through a client-side sanitizer, this defense proved insufficient. Client-side sanitizers are notoriously susceptible to parser-differential and mutation-based XSS (mXSS) bypasses. When a sanitizer fails to recognize a specific nested or malformed HTML construct, the browser's parser reconstructs the document into an active executable format during DOM insertion.\n\nOnce a payload successfully bypasses the sanitizer filter, it is written into the iframe's 'srcdoc' attribute. Because the iframe runs under the same-origin policy as the n8n interface, the script can seamlessly access the 'window.parent' object, bypassing any attempt to isolate the preview environment.

Code and Architecture Analysis

Analyzing the DOM structure reveals how the vulnerability manifests in the browser. In vulnerable versions of n8n, the preview panel renders the HTML content using a standard iframe tag without restriction:\n\nhtml\n<!-- Vulnerable Implementation -->\n<iframe srcdoc=\"<div>User-controlled content here</div>\"></iframe>\n\n\nTo remediate this, the iframe must be explicitly sandboxed to restrict script execution, form submission, and origin sharing. The patch introduces the 'sandbox' attribute to ensure that the iframe content is treated as having a unique, opaque origin, preventing it from interacting with the parent window:\n\nhtml\n<!-- Patched Implementation -->\n<iframe sandbox=\"allow-popups\" srcdoc=\"<div>User-controlled content here</div>\"></iframe>\n\n\nThe following diagram illustrates the interaction between the parent editor and the unsandboxed iframe:\n\nmermaid\ngraph LR\n Parent[\"n8n Editor Parent Window\"] -->|Injects output into srcdoc| Iframe[\"Unsandboxed Iframe\"]\n Iframe -->|Bypasses sanitizer| Script[\"Malicious Script Execution\"]\n Script -->|window.parent Access| Parent\n Parent -->|Steals session data| Attacker[\"Attacker Server\"]\n

Exploitation & Attack Path

To exploit this vulnerability, an attacker must first obtain 'global:member' privileges within the n8n application. This level of access allows the attacker to create or modify workflows, specifically configuring a node (such as an HTTP Request or Code node) that generates a custom execution output containing a crafted payload.\n\nOnce the malicious workflow is configured, the attacker triggers an execution or waits for a victim with administrative privileges to view the workflow run. When the victim opens the HTML preview panel for the affected node, the frontend retrieves the execution output, sanitizes it using the vulnerable client-side routine, and inserts it into the iframe.\n\nIf the payload leverages a parser-differential bypass, it executes within the iframe. Because the iframe is same-origin, the script accesses 'window.parent.localStorage' or cookies to retrieve the active session token. It then utilizes the 'fetch' API or 'navigator.sendBeacon' to transmit the credentials to an attacker-controlled listener, completing the session hijacking process.

Impact Assessment

The security consequences of CVE-2026-65597 are critical due to the privileged context in which n8n editors operate. Since n8n is an automation platform, the web interface typically has access to integrated database credentials, API keys, and third-party authentication tokens stored within the workspace.\n\nA successful session hijacking attack allows the adversary to impersonate the victim administrator entirely. The attacker can read sensitive workflow definitions, extract API credentials from the system configuration, or modify active workflows to execute arbitrary commands on the hosting server.\n\nThis vulnerability has been assigned a CVSS v4.0 score of 8.2 (High). The high impact on confidentiality and integrity, combined with the lack of system-level restrictions on same-origin iframe execution, makes it a severe vector for privilege escalation within the n8n ecosystem.

Mitigation and Remediation

The primary remediation for CVE-2026-65597 is updating the n8n installation to a secure release. The vendors have backported the fix to multiple release branches to ensure coverage for various deployment environments.\n\n> [!IMPORTANT]\n> Users on the 1.x branch must upgrade to version 1.123.64 or higher. Users on the 2.x branch must upgrade to version 2.29.8 or 2.30.1 depending on their current release track.\n\nIf immediate patching is not feasible, organizations should restrict member-level access ('global:member') to trusted personnel only. Additionally, administrators should avoid inspecting HTML previews of executions derived from untrusted external sources, such as public webhooks or unverified HTTP responses, until the software is updated.

Technical Appendix

CVSS Score
8.2/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:L/VA:N/SC:H/SI:L/SA:N

Affected Systems

n8n workflow automation platform

Affected Versions Detail

Product
Affected Versions
Fixed Version
n8n
n8n-io
< 1.123.641.123.64
n8n
n8n-io
2.x < 2.29.82.29.8
n8n
n8n-io
< 2.30.12.30.1
AttributeDetail
CWE IDCWE-79
Attack VectorNetwork (AV:N)
CVSS Score8.2 (High)
Privileges RequiredLow (PR:L)
User InteractionRequired (UI:A)
Exploit StatusProof-of-Concept / Conceptual
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1189Drive-by Compromise
Initial Access
T1185Browser Session Hijacking
Collection
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

The application does not neutralize or incorrectly neutralizes user-controlled input before it is placed in active content (HTML, JavaScript), allowing code execution.

Vulnerability Timeline

Vulnerability identified and reported to n8n security team
2026-02-15
Patched versions released by n8n team
2026-02-28
Coordinated vulnerability disclosure and CVE assignment
2026-03-05

References & Sources

  • [1]n8n Security Advisory (GHSA-p3rg-hrf9-w9gj)
  • [2]VulnCheck Security Bulletin
  • [3]n8n Release v1.123.64 Patch
  • [4]n8n Release v2.29.8 Patch
  • [5]n8n Release v2.30.1 Patch

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•GHSA-652Q-GVQ3-74QV
5.3

GHSA-652q-gvq3-74qv: SQL Injection in n8n Snowflake Node via Unparameterized Expression Interpolation

A SQL Injection vulnerability exists in the n8n Snowflake node's executeQuery operation. The vulnerability is caused by improper neutralization of expressions interpolated directly into database query strings. When raw Snowflake queries are built using untrusted external data without parameterization, an attacker can execute arbitrary SQL commands on the subsequent Snowflake database instance.

Alon Barad
Alon Barad
0 views•7 min read
•about 6 hours ago•CVE-2024-7708
7.5

CVE-2024-7708: Resource Exhaustion via HTTP Connection Buffer Leak in Eclipse Jetty

Eclipse Jetty is subject to an uncontrolled resource consumption vulnerability in its HTTP connection handling component. When processing certain HTTP request sequences, such as those invoking the Expect: 100-Continue handshake under specific network constraints, the server fails to return allocated buffers to its central pool. Over time, this leads to buffer pool exhaustion and a complete denial of service via memory starvation.

Amit Schendel
Amit Schendel
5 views•6 min read
•about 7 hours ago•CVE-2026-65595
8.9

CVE-2026-65595: Privilege Escalation and Remote Code Execution in n8n Token Exchange Module

CVE-2026-65595 is a high-severity privilege escalation vulnerability in the Token Exchange module of the n8n visual workflow automation platform. Due to an validation omission, the system unconditionally maps all Public API scopes to session tokens exchanged through trusted Identity Providers, entirely bypassing user-specific role checks.

Alon Barad
Alon Barad
7 views•6 min read
•about 9 hours ago•CVE-2026-65592
8.4

CVE-2026-65592: Stored DOM-based Cross-Site Scripting via cachedResultUrl in n8n

A Stored DOM-based Cross-Site Scripting (XSS) vulnerability exists within the frontend Resource Locator component of n8n. The flaw stems from insecure usage of window.open() where the application evaluates the workflow-persisted parameter 'cachedResultUrl' without verifying its protocol scheme. Authenticated attackers with permissions to create or edit workflows can insert a 'javascript:' URI payload, leading to arbitrary code execution in the victim's browser context upon interaction.

Alon Barad
Alon Barad
7 views•5 min read
•about 10 hours ago•CVE-2026-65599
5.1

CVE-2026-65599: Google Service Account Private Key Leakage via JWT Header Parameter in n8n

A credential exposure vulnerability in n8n (CVE-2026-65599) transmits the complete PEM-formatted Google Service Account private key in the 'kid' (Key ID) parameter of outbound JWT headers during Google API authentication. Because JWT headers are encoded in plain Base64URL and not encrypted, any entity that intercepts, logs, or processes these outbound requests can immediately extract the plaintext private key. This enables unauthorized third parties to fully compromise the corresponding Google Cloud Platform (GCP) service account and access any authorized cloud resources.

Alon Barad
Alon Barad
7 views•7 min read
•about 13 hours ago•CVE-2026-47300
8.8

CVE-2026-47300: Elevation of Privilege in ASP.NET Core Negotiate Authentication Handler

CVE-2026-47300 is a high-severity Elevation of Privilege (EoP) vulnerability in Microsoft's ASP.NET Core framework, affecting the Negotiate Authentication Handler when configured to retrieve security groups and role mappings via an LDAP/Active Directory directory service. In cross-platform Linux and macOS environments where native Windows token group expansion is unavailable, an authenticated attacker with low-privileged network access can manipulate LDAP query structures or force connections to untrusted directory resources, resulting in unauthorized administrative role assignment.

Amit Schendel
Amit Schendel
7 views•6 min read