CVE-2026-56356: n8n: stored XSS in Chat Trigger Custom CSS field
MEDIUMn8n's Chat Trigger node fails to properly sanitize the Custom CSS field due to a misconfiguration in the sanitize-html library, letting an authenticated workflow author inject JavaScript that executes in the browser of anyone who visits the resulting public chat page. This matters because n8n is widely deployed as the orchestration layer for AI agent workflows, and public chat triggers are commonly exposed to customers, partners, or end users as the front door to those agents — a low-privilege insider or a compromised low-privilege account becomes a vector for credential theft, session hijacking, or further pivoting against every visitor. There's no CISA KEV listing, no public exploit or Nuclei template yet, and EPSS sits at 0.00177 (top 93rd percentile of scored CVEs, but still a low absolute probability), so this is not an active-exploitation emergency. That said, n8n has 116 other CVEs on record and an OpenSSF Scorecard of only 6.6/10, indicating a broader pattern of security debt worth factoring into deployment hardening. Patch to 1.123.27, 2.13.3, or 2.14.1 immediately, and until then restrict who can create or edit Chat Trigger workflows and audit any Custom CSS fields for suspicious markup or script-like content.
What is the risk?
Medium severity (CVSS 5.4) reflects the authentication and user-interaction requirements: PR:L means the attacker must already hold a role permitted to create or modify workflows, and UI:R means a victim must visit the public chat page for the payload to fire. The scope-changed (S:C) rating is the key driver of concern — the stored script executes in the security context of whoever views the chat page, not the attacker's own session, enabling lateral impact beyond the vulnerable component. Confidentiality and integrity impacts are limited (C:L/I:L) and there is no availability impact. With no KEV listing, no public PoC, and a low EPSS score, near-term mass exploitation is unlikely, but the low bar for the attacking user (any account with workflow edit rights, which in many organizations includes contractors or junior automation engineers) keeps this a realistic insider/compromised-account risk, especially for organizations exposing chat-triggered agents externally.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| n8n | npm | — | No patch |
Do you use n8n? You're affected.
How severe is it?
What is the attack surface?
What should I do?
1 step-
Upgrade n8n to 1.123.27 (LTS/pre-2.0 line), 2.13.3, or 2.14.1, whichever branch is in use — these releases fix the sanitize-html misconfiguration. Until patched, restrict Chat Trigger creation/edit permissions to trusted administrators only and review the RBAC model to ensure ordinary workflow editors cannot modify Custom CSS on public-facing nodes. Audit existing workflows for any Custom CSS fields containing script tags, event handler attributes (onerror, onload), javascript: URIs, or other markup that could execute code, and sanitize or remove them. Add a Content-Security-Policy header on any reverse proxy in front of public chat pages to limit inline script execution as defense-in-depth, and monitor n8n audit logs for unexpected edits to Chat Trigger nodes by unusual accounts.
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-56356?
n8n's Chat Trigger node fails to properly sanitize the Custom CSS field due to a misconfiguration in the sanitize-html library, letting an authenticated workflow author inject JavaScript that executes in the browser of anyone who visits the resulting public chat page. This matters because n8n is widely deployed as the orchestration layer for AI agent workflows, and public chat triggers are commonly exposed to customers, partners, or end users as the front door to those agents — a low-privilege insider or a compromised low-privilege account becomes a vector for credential theft, session hijacking, or further pivoting against every visitor. There's no CISA KEV listing, no public exploit or Nuclei template yet, and EPSS sits at 0.00177 (top 93rd percentile of scored CVEs, but still a low absolute probability), so this is not an active-exploitation emergency. That said, n8n has 116 other CVEs on record and an OpenSSF Scorecard of only 6.6/10, indicating a broader pattern of security debt worth factoring into deployment hardening. Patch to 1.123.27, 2.13.3, or 2.14.1 immediately, and until then restrict who can create or edit Chat Trigger workflows and audit any Custom CSS fields for suspicious markup or script-like content.
Is CVE-2026-56356 actively exploited?
No confirmed active exploitation of CVE-2026-56356 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-56356?
Upgrade n8n to 1.123.27 (LTS/pre-2.0 line), 2.13.3, or 2.14.1, whichever branch is in use — these releases fix the sanitize-html misconfiguration. Until patched, restrict Chat Trigger creation/edit permissions to trusted administrators only and review the RBAC model to ensure ordinary workflow editors cannot modify Custom CSS on public-facing nodes. Audit existing workflows for any Custom CSS fields containing script tags, event handler attributes (onerror, onload), javascript: URIs, or other markup that could execute code, and sanitize or remove them. Add a Content-Security-Policy header on any reverse proxy in front of public chat pages to limit inline script execution as defense-in-depth, and monitor n8n audit logs for unexpected edits to Chat Trigger nodes by unusual accounts.
What systems are affected by CVE-2026-56356?
This vulnerability affects the following AI/ML architecture patterns: agent frameworks, low-code workflow orchestration, public-facing chat interfaces.
What is the CVSS score for CVE-2026-56356?
CVE-2026-56356 has a CVSS v3.1 base score of 5.4 (MEDIUM). The EPSS exploitation probability is 0.18%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0011 User Execution AML.T0049 Exploit Public-Facing Application Compliance Controls Affected
What are the technical details?
Original Advisory
n8n contains a stored cross-site scripting vulnerability in the Chat Trigger node's Custom CSS field due to a misconfiguration of the sanitize-html library. Affected releases are those before 1.123.27, the 2.0.0 through 2.13.2 line, and 2.14.0 (fixed in 1.123.27, 2.13.3, and 2.14.1). An authenticated user with permission to create or modify workflows can inject JavaScript that bypasses sanitization, resulting in stored XSS against any user who visits the public chat page.
Exploitation Scenario
An adversary with low-privilege access to an n8n instance — for example, a contractor account, a compromised employee credential, or an intentionally malicious insider with workflow-edit rights — modifies the Custom CSS field of a public Chat Trigger node used for a customer-facing support agent. They embed a crafted CSS payload that bypasses sanitize-html's filtering to execute arbitrary JavaScript. When a customer or partner opens the public chat page to interact with the AI agent, the injected script runs in their browser, silently exfiltrating session cookies, redirecting them to a credential-harvesting page, or performing actions on their behalf within the chat context. Because the payload is stored server-side in the workflow configuration, it persists and re-fires for every subsequent visitor until the workflow is fixed or the platform is patched.
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') 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.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N References
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