Stored XSS in n8n LangChain Chat Trigger Node via initialMessages Parameter
Impact
A stored Cross-Site Scripting (XSS) vulnerability was identified in the @n8n/n8n-nodes-langchain.chatTrigger node in n8n. If an authorized user configures the node with malicious JavaScript in the initialMessages field and enables public access, the script will be executed in the browser of anyone who visits the resulting public chat URL.
This vulnerability could be exploited for phishing or to steal cookies or other sensitive data from users who access the public chat link, posing a security risk.
Patches
This issue has been patched in version 1.107.0 of n8n. Users should upgrade to version 1.107.0 or later.
Workarounds
Disabling the n8n-nodes-langchain.chatTrigger node (docs)
References
#18148
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | n8n | >= 1.24.0, < 1.107.0 | 1.107.0 |
References
- https://github.com/n8n-io/n8n/security/advisories/GHSA-mvh4-2cm2-6hpg
- https://nvd.nist.gov/vuln/detail/CVE-2025-58177
- https://github.com/n8n-io/n8n/pull/18148
- https://github.com/n8n-io/n8n/commit/d4ef191be0b39b65efa68559a3b8d5dad2e102b2
- https://docs.n8n.io/hosting/securing/blocking-nodes
- https://github.com/n8n-io/n8n
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N- Weakness (CWE)
CWE-79- Platform
- npm
- Package
n8n- Disclosed
- 15.09.2025
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-mvh4-2cm2-6hpg - CC BY 4.0
Vulnerability history: n8n
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 156
- First → latest
- 05.2023 09.2026
- Without a fix
- 1
- Exploited in attacks
- 1
Severity breakdown
- Critical 24
- High 58
- Medium 74
Disclosures per year
- 2023: 3
- 2024: 0
- 2025: 14
- 2026: 139
-
Stored XSS in n8n LangChain Chat Trigger Node via initialMessages Parameter this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.