This is a DOM-based cross-site scripting flaw in n8n's workflow execution preview: output is rendered into an iframe without the sandbox attribute, and a sanitizer bypass lets injected script run same-origin as the editor, so it can call authenticated n8n APIs using the victim's own session cookie. Any account with global:member privileges — a low bar in most n8n deployments — can craft the payload, and the real damage lands on whoever opens the preview, typically a workflow owner or admin with broad credential and integration access across connected AI agents and services. There's no evidence of active exploitation (not in CISA KEV), no public PoC, and no EPSS score yet, but n8n's track record of 150 prior CVEs and a middling 6.6/10 OpenSSF Scorecard argue for treating this platform's security hygiene as an ongoing concern rather than a one-off patch. n8n sits at the center of many AI agent/automation stacks (16 tracked downstream dependents), so a hijacked editor session can cascade into credential theft or workflow tampering across everything it orchestrates. Patch immediately to n8n 1.123.64, 2.29.8, or 2.30.1; in the meantime, restrict who can hold global:member accounts, review workflow-sharing permissions, and flag any unexpected authenticated API activity that follows a preview being opened.
What is the risk?
Exploitability is moderate: the attacker needs an existing global:member account and a sanitizer-bypass payload, then depends on a higher-privileged user opening the crafted preview — not a zero-click, but a low bar in collaborative n8n environments where workflow sharing is common. Impact is significant because the payload executes with the victim's authenticated session, enabling API calls that could exfiltrate stored credentials, modify workflows, or escalate privileges within the instance. With no CISA KEV listing, no EPSS score, no public exploit, and no Nuclei template, there's no signal of active or imminent mass exploitation, but the combination of a same-origin session-riding primitive and n8n's role as an automation hub for AI agents and connected services keeps overall risk at Medium-High for any instance with untrusted or semi-trusted internal users.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| n8n | npm | < 1.123.64 | 1.123.64 |
Do you use n8n? You're affected.
How severe is it?
What should I do?
1 step-
Upgrade to n8n 1.123.64, 2.29.8, or 2.30.1 immediately, where the iframe sandboxing and sanitizer are fixed. Until patched, restrict who can be granted global:member accounts, limit or disable workflow sharing between untrusted users, and instruct admins/workflow owners not to open HTML previews of executions from workflows they didn't author or don't trust. Add detection for anomalous authenticated API calls (user creation, credential export, workflow edits) occurring immediately after a preview is opened, and review recent audit logs for signs of privilege escalation via this vector.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-65597?
This is a DOM-based cross-site scripting flaw in n8n's workflow execution preview: output is rendered into an iframe without the sandbox attribute, and a sanitizer bypass lets injected script run same-origin as the editor, so it can call authenticated n8n APIs using the victim's own session cookie. Any account with global:member privileges — a low bar in most n8n deployments — can craft the payload, and the real damage lands on whoever opens the preview, typically a workflow owner or admin with broad credential and integration access across connected AI agents and services. There's no evidence of active exploitation (not in CISA KEV), no public PoC, and no EPSS score yet, but n8n's track record of 150 prior CVEs and a middling 6.6/10 OpenSSF Scorecard argue for treating this platform's security hygiene as an ongoing concern rather than a one-off patch. n8n sits at the center of many AI agent/automation stacks (16 tracked downstream dependents), so a hijacked editor session can cascade into credential theft or workflow tampering across everything it orchestrates. Patch immediately to n8n 1.123.64, 2.29.8, or 2.30.1; in the meantime, restrict who can hold global:member accounts, review workflow-sharing permissions, and flag any unexpected authenticated API activity that follows a preview being opened.
Is CVE-2026-65597 actively exploited?
No confirmed active exploitation of CVE-2026-65597 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-65597?
Upgrade to n8n 1.123.64, 2.29.8, or 2.30.1 immediately, where the iframe sandboxing and sanitizer are fixed. Until patched, restrict who can be granted global:member accounts, limit or disable workflow sharing between untrusted users, and instruct admins/workflow owners not to open HTML previews of executions from workflows they didn't author or don't trust. Add detection for anomalous authenticated API calls (user creation, credential export, workflow edits) occurring immediately after a preview is opened, and review recent audit logs for signs of privilege escalation via this vector.
What systems are affected by CVE-2026-65597?
This vulnerability affects the following AI/ML architecture patterns: agent frameworks, workflow orchestration / automation pipelines, AI integration hubs.
What is the CVSS score for CVE-2026-65597?
No CVSS score has been assigned yet.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0012 Valid Accounts AML.T0106 Exploitation for Credential Access Compliance Controls Affected
What are the technical details?
Original Advisory
n8n before 1.123.64, 2.x before 2.29.8, and before 2.30.1 contains a DOM-based cross-site scripting vulnerability in the HTML preview, which renders execution output into an iframe srcdoc without the sandbox attribute. A sanitizer bypass allows injected script to execute same-origin as the editor. When a victim opens the preview, the script can call authenticated APIs using the victim's session. An account with global:member privileges can exploit the issue.
Exploitation Scenario
An attacker who holds or compromises a global:member n8n account builds a workflow whose execution output embeds a crafted payload that slips past the HTML sanitizer. They share the workflow — or wait for it to surface in a shared project — until a higher-privileged user (an admin or workflow owner) opens the execution's HTML preview. Because the iframe lacks the sandbox attribute, the injected script runs same-origin as the n8n editor and inherits the victim's session, letting the attacker's script silently call n8n's authenticated APIs: creating a new admin account, exporting credentials stored in connected AI/API nodes, or rewriting other workflows to establish persistence — all without the victim ever knowing their session was used.
Weaknesses (CWE)
CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Primary
CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Primary
CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') CWE-79 — Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'): The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
- [Architecture and Design] Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482]. Examples of libraries and frameworks that make it easier to generate properly encoded output include Microsoft's Anti-XSS library, the OWASP ESAPI Encoding module, and Apache Wicket.
- [Implementation, Architecture and Design] Understand the context in which your data will be used and the encoding that will be expected. This is especially important when transmitting data between different components, or when generating outputs that can contain multiple encodings at the same time, such as web pages or multi-part mail messages. Study all expected communication protocols and data representations to determine the required encoding strategies. For any data that will be output to another web page, especially any data that was received from external inputs, use the appropriate encoding on all non-alphanumeric characters. Parts of the same output document may require different encodings, which will vary depending on whether the output is in the: etc. Note that HTML Entity Encoding is only appropriate for the HTML body. Consult the XSS Prevention Cheat Sheet [REF-724] for more details on the types of encoding and escaping that are needed. HTML body Element attributes (such as src="XYZ") URIs JavaScript sections Casca
Source: MITRE CWE corpus.
References
- github.com/n8n-io/n8n/security/advisories/GHSA-p3rg-hrf9-w9gj vendor-advisory
- vulncheck.com/advisories/n8n-before-dom-based-xss-via-unsandboxed-iframe third-party-advisory
- github.com/advisories/GHSA-p3rg-hrf9-w9gj
- github.com/n8n-io/n8n/releases/tag/n8n@1.123.64
- github.com/n8n-io/n8n/releases/tag/n8n@2.29.8
- github.com/n8n-io/n8n/releases/tag/n8n@2.30.1
- nvd.nist.gov/vuln/detail/CVE-2026-65597
Timeline
Related Vulnerabilities
CVE-2026-33663 10.0 n8n: member role steals plaintext HTTP credentials
Same package: n8n CVE-2026-33660 10.0 TensorFlow: type confusion NPD in tensor conversion
Same package: n8n CVE-2026-21858 10.0 n8n: Input Validation flaw enables exploitation
Same package: n8n CVE-2026-27577 9.9 n8n: Code Injection enables RCE
Same package: n8n CVE-2026-27494 9.9 n8n: security flaw enables exploitation
Same package: n8n