Stored XSS in n8n LangChain Chat Trigger Node via initialMessages Parameter

Description

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

Basic information

Type
reviewed
Severity
medium
Advisory on GitHub
Open advisory ↗
Repository advisory
Open repository advisory ↗
Source code
Browse source ↗
Published (advisory)
2025-09-15 17:14:27 UTC
Updated
2025-09-15 20:07:56 UTC
GitHub reviewed
2025-09-15 17:14:27 UTC
NVD published
2025-09-15

EPSS Score

Score Percentile
0.03% 7.31%

CVSS Scores

Base score Version Severity Vector
4.1 3.1
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:N)
Service keeps running; no real outage angle.

Identifiers

CWEs

CWE id Name
CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Credits

  • pfelilpe (finder)
  • 5h0lm3s (finder)

Affected packages (1)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
npm n8n >= 1.24.0, < 1.107.0 1.107.0

References

cvelogic Threat Intelligence