highAgent ThreatFramework Vulnerability

n8n Resource Locator Stored DOM XSS via cachedResultUrl

First seen Jul 22, 2026 · Updated Jul 22, 2026

n8nXSSDOM-basedstored-XSSworkflow-automationwindow.openscheme-validationworkflow-poisoningASI09 · Human Trust ExploitationSurface: Human InterfacePropagation: Single Hop

n8n's Resource Locator UI passes a workflow-persisted URL field (cachedResultUrl) directly into window.open() without validating the URI scheme, allowing a malicious workflow to execute attacker-controlled JavaScript in a victim's browser when they interact with a crafted link. This is a stored XSS issue in the n8n web application rather than a direct compromise of an AI agent's reasoning, but since n8n is widely used to orchestrate AI/LLM agent workflows, exploitation could let an attacker pivot from the browser context into workflow credentials, connected integrations, or agent control surfaces. Official patches are available (1.123.64, 2.29.8, 2.30.1).

Technical Analysis

The Resource Locator component stores a cachedResultUrl value as part of workflow JSON; this value is attacker-controllable if the attacker can create or modify a shared workflow. When a victim opens the workflow and clicks the associated link, n8n calls window.open() on the unsanitized URL without restricting it to http/https schemes, permitting javascript: or other script-executing URI schemes to run in the victim's session context (which typically has authenticated access to workflow credentials and connected services). The entry point is workflow import/sharing (a supply-chain-like vector for internally shared automations), and the impact is client-side code execution in the n8n editor UI, enabling session hijacking, credential theft, or further manipulation of automations — including those that drive AI agents or call LLM/tool APIs. This crosses a trust boundary because workflow data, normally treated as inert configuration, is executed as active browser content once a user interacts with it.

Affected Systems

n8n

Detection Signatures

  • Workflow JSON fields containing cachedResultUrl with non-http(s) schemes (e.g., javascript:, data:, vbscript:)
  • Unexpected window.open() calls triggered from Resource Locator UI elements
  • Workflows imported from untrusted/external sources containing embedded resource locator links
  • Audit logs showing workflow edits introducing new cachedResultUrl values shortly before user-reported browser anomalies

Remediation Steps

  1. 1

    Upgrade n8n

    Update to n8n 1.123.64, 2.29.8, 2.30.1, or later where scheme validation for cachedResultUrl has been implemented.

  2. 2

    Restrict workflow editing permissions

    Limit workflow creation/editing to fully trusted users until patched, reducing the chance of malicious cachedResultUrl injection.

  3. 3

    Audit existing workflows

    Scan stored workflows for cachedResultUrl values using non-HTTP(S) schemes and remove/quarantine any suspicious entries.

  4. 4

    Enforce CSP and sandboxing

    Apply strict Content-Security-Policy headers and browser sandboxing for the n8n editor to reduce impact of any residual DOM XSS.

  5. 5

    Monitor for credential exposure

    Rotate credentials stored in n8n if compromise is suspected, since XSS in the editor can lead to session or credential theft.

CVE / Advisory IDs

CVE-2026-65592GHSA-9wcp-9r3j-383q

Industries Most Exposed

softwareIT/DevOpsSaaStechnologyany-industry-using-n8n-automation

Sources

Respond to this threat

Pro subscribers get a full AI-generated incident-response playbook for this threat — detection, containment, eradication, and recovery steps — plus an unlimited AI Threat Advisor for questions about your environment.