Understanding the n8n Stored XSS Vulnerability
The n8n workflow automation platform, specifically its LangChain Chat Trigger node, was recently found to have a stored Cross-Site Scripting (XSS) vulnerability. This means a malicious actor could embed harmful code within the platform’s configuration, which would then execute in the web browser of anyone who views the affected public chat interface.
Imagine visiting a public chat link and, without knowing it, your browser runs a hidden script. This script could be designed to steal your session cookies, redirect you to a phishing site, or collect other sensitive information, making this a significant concern for users and administrators alike.
CVE Details
- Product: n8n workflow automation platform (specifically the `@n8n/n8n-nodes-langchain.chatTrigger` component)
- CVE ID: CVE-2025-58177
- Published: September 15, 2025
- Severity: Medium
- Status: Analyzed
Affected Products
This vulnerability impacts versions of n8n ranging from 1.24.0 up to, but not including, 1.107.0. Users running any version within this range are advised to take immediate action.
Current Status
The vulnerability has been officially “Analyzed.” This indicates that the issue has been thoroughly investigated and understood by the developers.
Severity Level
Rated as “Medium” severity, this XSS vulnerability can still pose a considerable risk. While it typically requires some user interaction (like an authorized user configuring the node and a different user visiting the malicious public chat URL), the potential impact is significant. Successful exploitation could lead to:
- Session Hijacking: Attackers could steal session cookies, impersonating legitimate users.
- Phishing Attacks: Users could be redirected to fake websites designed to steal credentials.
- Data Theft: Sensitive data displayed or stored in the user’s browser could be exfiltrated.
Possible Solutions
The good news is that a fix is available and simple to implement:
- Update Immediately: The primary recommendation is to update your n8n instance to version 1.107.0 or later. This version includes critical updates that introduce robust parameter validation and type assertions, preventing malicious scripts from being injected into sensitive fields like
initialMessages. - Workaround: If an immediate update isn’t feasible, you can mitigate the risk by disabling the affected
chatTriggernode within your n8n environment. This will prevent the vulnerable component from being exposed.
It’s crucial to implement these solutions promptly to protect your n8n instance and its users from potential attacks.
References
https://github.com/n8n-io/n8n/commit/d4ef191be0b39b65efa68559a3b8d5dad2e102b2
https://github.com/n8n-io/n8n/pull/18148
https://github.com/n8n-io/n8n/security/advisories/GHSA-mvh4-2cm2-6hpg