High (AgentArmorHQ estimate)Code execution

n8n: DOM-Based XSS via Unsandboxed iframe srcdoc in HTML Preview

Product
n8n
CVE
CVE-2026-65597
Affected
n8n < 1.123.64, >= 2.0.0-rc.0 < 2.29.8, >= 2.30.0 < 2.30.1
Fixed in
1.123.64, 2.29.8, 2.30.1

Last verified against sources: October 26, 2026

Am I affected?

n8n: affected n8n < 1.123.64, >= 2.0.0-rc.0 < 2.29.8, >= 2.30.0 < 2.30.1. Fixed in 1.123.64, 2.29.8, 2.30.1.

  • Check your version: run npm ls n8n. Versions < 1.123.64 of n8n are affected. [1]

What to do now

  1. Upgrade to the fixed version: run npm install n8n@1.123.64 (first patched version 1.123.64). [1]
  2. Upgrade to n8n 1.123.64, 2.29.8, or 2.30.1 or later. [1]
  3. Restrict n8n instance access to fully trusted users only. [1]
  4. Set the N8N_CONTENT_SECURITY_POLICY environment variable to a policy that blocks inline scripts. [1]
  5. Avoid exposing workflows that render externally-controlled input into the HTML node or binary HTML preview to untrusted users. [1]

General practice, not from the source: if the affected software could read tokens or credentials, rotate them after upgrading; pin versions and review changes before updating tools your agents run.

Discuss this incident

What happened

  • The HTML preview renders execution output into an iframe srcdoc without sandbox. [1]
  • A sanitizer bypass lets injected script run same-origin as the editor. [1]
  • An account with global:member privileges can exploit it. [1]

Impact

  • When a victim opens the preview, it can call authenticated APIs with their session. [1]

What was done

  • The issue has been fixed in n8n versions 1.123.64, 2.29.8, and 2.30.1. [1]
  • Users should upgrade to one of these versions or later to remediate the vulnerability. [1]

Sources

  1. GHSA-p3rg-hrf9-w9gj — GitHub Advisory Database

Every statement above was checked against these sources before publishing. Spotted an error? Tell us and we will correct it with a dated note.

Share advisory brief with your team

Copy a plain-text summary for Slack, GitHub issues, or team security channels.

Brief
[CVE-2026-65597] n8n: DOM-Based XSS via Unsandboxed iframe srcdoc in HTML Preview
Product: n8n | Affected: n8n < 1.123.64, >= 2.0.0-rc.0 < 2.29.8, >= 2.30.0 < 2.30.1 | Fixed in: 1.123.64, 2.29.8, 2.30.1
Summary: The HTML preview renders execution output into an `iframe srcdoc` without `sandbox`.
Source & remediation on AgentArmorHQ: https://agentarmorhq.com/incidents/2026/07/cve-2026-65597-n8n
Was this page useful?

Corrections

Report an error or request a correction. We review requests within 5 business days and add a dated correction note.

10 to 2,000 characters. A link to a source helps. Stored as plain text.

Discussions for CVE-2026-65597

Ask questions or share configuration tips. Governed by our Community Rules & Terms.

No posts match this filter yet.

Be the first to ask a question or share a working tip.

Check before you install

Paste a package name or a GitHub link and get a clear answer in seconds: Block, Review or No known issues. No account needed.

Check a package

Questions? Contact us