Stored XSS in n8n LangChain Chat Trigger Node via initialMessages ParameterGHSA-mvh4-2cm2-6hpg
MEDIUMFix: n8n-io/n8n#18148GHSA-mvh4-2cm2-6hpg is a medium-severity (CVSS 4.1) Cross-site Scripting (XSS) vulnerability in n8n. A fix is available for n8n — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-mvh4-2cm2-6hpg.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
n8nnpmDescription
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
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | n8n | ≥ 1.24.0&&< 1.107.0 | 1.107.0npm install n8n@1.107.0 |
Affected Products
n8nn8nDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for n8n, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update n8n to 1.107.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-mvh4-2cm2-6hpg is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Frequently Asked Questions
Is GHSA-mvh4-2cm2-6hpg in your dependencies?
Find it across npm, including transitive dependencies.