n8n HTML Preview XSS Lets Low-Privilege Users Hijack Admin Sessions
Vulnerability Disclosure · 2 sources · Updated 4mo ago · First seen Jul 22, 2026

A high-severity DOM-based XSS flaw tracked as CVE-2026-65597 affects n8n's HTML preview feature, where execution output is rendered into an iframe using srcdoc without a sandbox attribute. The weakness allows a sanitizer bypass and same-origin script execution in the editor context, enabling an attacker to trigger authenticated actions through a victim's active session. The issue affects n8n before 1.123.64, 2.x before 2.29.8, and versions before 2.30.1.
An attacker with global:member privileges can create or modify a workflow so a malicious payload is stored in execution output and later executed when an administrator opens the HTML preview panel. Reports say the injected script can access the parent window, steal session data from localStorage or cookies, and exfiltrate it to an attacker-controlled server, effectively enabling session hijacking and API abuse. The vendor mitigated the flaw by sandboxing the iframe in the patched implementation.


