Stored XSS in n8n LangChain Chat Trigger Node via initialMessages Parameter
Medium4.1CVE-2025-58177 · Published Sep 15, 2025
### 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](https://docs.n8n.io/hosting/securing/blocking-nodes/)) ### References #18148
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| n8n npm | >= 1.24.0, < 1.107.0 | 1.107.0 |
Details and references
- CVSS 3.1
- CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-79
- Also known as
- CVE-2025-58177
More n8n advisories
All n8n| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Oct 302025 | n8n Vulnerable to Remote Code Execution via Git Node Pre-Commit Hook | High8.8 | 1.113.0 |
| Oct 92025 | n8n: Execute Command Node Allows Authenticated Users to Run Arbitrary Commands on Host | High8.8 | No fix yet |
| Aug 202025 | n8n symlink traversal vulnerability in "Read/Write File" node allows access to restricted files | Medium6.5 | 1.106.0 |
| Aug 192025 | Stored XSS in n8n Form Trigger allows Account Takeover via injected iframe and video/source | High8.7 | 1.98.2 |
| Jul 32025 | n8n is vulnerable to Improper Authorization through its `/stop` endpoint | Medium4.3 | 1.99.1 |
| Jul 32025 | n8n Vulnerable to Denial of Service via Malformed Binary Data Requests | Medium4.9 | 1.99.0 |