| Component | LangChain, n8n |
| Severity | medium (CVSS 5.4) |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| Published (NVD) | 2025-09-15 |
| Last modified | 2026-06-17 |
| Affected versions | n8n >= 1.24.0, < 1.107.0 |
| Fixed in | 1.107.0 |
| Weakness | CWE-79 |
| CISA KEV | not listed |
NVD description
n8n is an open source workflow automation platform. From 1.24.0 to before 1.107.0, there is a stored cross-site scripting (XSS) vulnerability in @n8n/n8n-nodes-langchain.chatTrigger. An authorized user can configure the LangChain Chat Trigger node with malicious JavaScript in the initialMessages field and enable public access so that the payload is executed in the browser of any user who visits the resulting public chat URL. This can be used for phishing or to steal cookies or other sensitive data from users accessing the public chat link. The issue is fixed in version 1.107.0. Updating to 1.107.0 or later is recommended. As a workaround, the affected chatTrigger node can be disabled. No other workarounds are known.
What to do
- Upgrade LangChain to
1.107.0or later. - Do not expose the component's API or UI to the internet without authentication in front of it.
Sources
- NVD: CVE-2025-58177
- https://github.com/n8n-io/n8n/security/advisories/GHSA-mvh4-2cm2-6hpg
- https://github.com/n8n-io/n8n/commit/d4ef191be0b39b65efa68559a3b8d5dad2e102b2
- https://github.com/n8n-io/n8n/pull/18148
Read more
Other LangChain CVEs
LangChain is a framework for building LLM-powered applications. Prior to 1.1.1, @langchain/redis does not escape attacker-controlled values...
LangChain is a framework for building LLM-powered applications. Prior to 1.3.1, MongoDBChatMessageHistory does not enforce the documented st...
The OpenAI-compatible file upload endpoint `/v1/files` in Langchain-Chatchat 0.3.0 is vulnerable to path traversal. An attacker can write fi...
The /knowledge_base/upload_temp_docs temporary document upload endpoint in Langchain Chatchat 0.3.1 is vulnerable to path traversal. By craf...
The knowledge base creation and document upload interfaces in Langchain-Chatchat 0.3.0;0.3.1 is vulnerable to path traversal. An attacker ca...
LangChain MongoDB provides integrations between MongoDB, Atlas, LangChain, and LangGraph. Prior to langgraph-checkpoint-mongodb 0.3.0 and la...