CVE-2025-58177
BaseFortify
Publication date: 2025-09-15
Last updated on: 2025-10-14
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| n8n | n8n | From 1.24.0 (inc) to 1.107.0 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-79 | 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. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2025-58177 is a stored Cross-Site Scripting (XSS) vulnerability in the @n8n/n8n-nodes-langchain.chatTrigger node of the n8n workflow automation platform, affecting versions from 1.24.0 up to but not including 1.107.0. An authorized user can insert malicious JavaScript code into the "initialMessages" field and enable public access, causing the malicious script to be stored and executed in the browsers of any users who visit the public chat URL. This allows attackers to perform phishing attacks or steal cookies and other sensitive data from users accessing the public chat link. The root cause is improper neutralization of user input before embedding it in web pages (CWE-79). The issue was fixed in version 1.107.0 by sanitizing inputs, validating parameters, and removing dangerous protocols. [1, 2, 3]
How can this vulnerability impact me? :
This vulnerability can impact you by allowing attackers to execute malicious JavaScript in the browsers of users who visit a public chat URL configured with the vulnerable node. This can lead to phishing attacks or theft of cookies and other sensitive information from those users. The attack requires an authorized user to configure the node with malicious input and enable public access, and victims must visit the malicious URL for the attack to succeed. The confidentiality impact is low, but it can compromise user data and trust. [1]
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by identifying if your n8n instance is running a vulnerable version (from 1.24.0 up to but not including 1.107.0) and if the @n8n/n8n-nodes-langchain.chatTrigger node is enabled with public access. Detection involves checking for the presence of the chatTrigger node configured with potentially malicious JavaScript in the initialMessages field. Since the vulnerability requires an authorized user to input malicious code and enable public access, you can audit your workflows for the chatTrigger node settings. There are no specific commands provided in the resources, but you can check your n8n workflows configuration files or database entries for the chatTrigger node's initialMessages parameter and public access settings. Additionally, monitoring HTTP requests to public chat URLs for suspicious script execution or unusual payloads could help detect exploitation attempts. [1]
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include upgrading your n8n installation to version 1.107.0 or later, where the vulnerability is fully patched. If upgrading is not immediately possible, you should disable the affected @n8n/n8n-nodes-langchain.chatTrigger node to prevent exploitation. The patch includes comprehensive input sanitization, strict parameter validation, and removal of dangerous protocols to prevent XSS attacks. Therefore, applying the official update is the recommended and most effective mitigation. [1]