{"id":"CVE-2025-58177","published":"2025-09-15T16:49:06Z","modified":"2025-09-15T17:27:13Z","title":"n8n stored cross-site scripting in LangChain Chat Trigger node initialMessages parameter","vendor":"n8n","product":"n8n","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.4,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0041,"percentile":0.26808,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/n8n-io/n8n/security/advisories/GHSA-mvh4-2cm2-6hpg","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/n8n-io/n8n/pull/18148","tags":["x_refsource_MISC"]},{"url":"https://github.com/n8n-io/n8n/commit/d4ef191be0b39b65efa68559a3b8d5dad2e102b2","tags":["x_refsource_MISC"]}],"priority":{"score":9.1,"factors":[{"name":"EPSS percentile","points":5.36},{"name":"CVSS severity","points":3.78}]},"vendorSlug":"n8n","affectedVersions":[{"vendor":"n8n-io","product":"n8n","versions":[">= 1.24.0, < 1.107.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-09-15T17:26:58.176874Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"n8n","vulnerableRanges":[">=1.24.0, <1.107.0"],"patched":["1.107.0"],"from":["GHSA-mvh4-2cm2-6hpg"],"provenance":"source"}],"summary":{"text":"The n8n workflow automation platform (versions 1.24.0 up to, but not including, 1.107.0) contains a stored cross-site scripting flaw in the initialMessages parameter of the LangChain Chat Trigger node (@n8n/n8n-nodes-langchain.chatTrigger). An attacker with an authorized, low-privileged account who can configure a workflow and enable public access can embed malicious JavaScript that executes in the browser of any visitor to the resulting public chat URL, with user interaction required, enabling phishing or theft of cookies and other sensitive data.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:16:01Z"},"euvd":{"id":"EUVD-2025-29216","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-n8n-cve-2025-52478","children":[{"from":"CVE-2025-58177","to":"CVE-2026-25055","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/workflow/src/index.ts"],"commits":["https://github.com/n8n-io/n8n/commit/d4ef191be0b39b65efa68559a3b8d5dad2e102b2","https://github.com/n8n-io/n8n/commit/528ad6b982d0519ec170e172f57b7fdbbe175230","https://github.com/n8n-io/n8n/commit/e0baf48c6a54808f6dbca8cb352bfa306092c223"],"basis":"rarely changed file"}]},{"from":"CVE-2025-58177","to":"CVE-2026-27577","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/@n8n/nodes-langchain/nodes/trigger/ChatTrigger/templates.ts"],"commits":["https://github.com/n8n-io/n8n/commit/d4ef191be0b39b65efa68559a3b8d5dad2e102b2","https://github.com/n8n-io/n8n/commit/1479aab2d32fe0ee087f82b9038b1035c98be2f6","https://github.com/n8n-io/n8n/commit/9e5212ecbc5d2d4e6f340b636a5e84be6369882e"],"basis":"shared function","functions":["createPage"]}]},{"from":"CVE-2025-58177","to":"CVE-2026-27578","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/@n8n/nodes-langchain/nodes/trigger/ChatTrigger/templates.ts"],"commits":["https://github.com/n8n-io/n8n/commit/d4ef191be0b39b65efa68559a3b8d5dad2e102b2","https://github.com/n8n-io/n8n/commit/1479aab2d32fe0ee087f82b9038b1035c98be2f6"],"basis":"shared function","functions":["createPage"]}]},{"from":"CVE-2025-58177","to":"CVE-2026-56353","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/@n8n/nodes-langchain/nodes/trigger/ChatTrigger/templates.ts"],"commits":["https://github.com/n8n-io/n8n/commit/d4ef191be0b39b65efa68559a3b8d5dad2e102b2","https://github.com/n8n-io/n8n/commit/1479aab2d32fe0ee087f82b9038b1035c98be2f6"],"basis":"shared function","functions":["createPage"]}]}],"packageHistory":[{"cve":"CVE-2025-49595","published":"2025-07-03","fixed":"1.99.0","kev":false},{"cve":"CVE-2025-52554","published":"2025-07-03","fixed":"1.99.1","kev":false},{"cve":"CVE-2025-57749","published":"2025-08-20","fixed":"1.106.0","kev":false,"link":{"from":"CVE-2025-57749","to":"CVE-2025-58177","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:n8n","fromFixed":"1.106.0","toFixed":"1.107.0","daysApart":26}]}},{"cve":"CVE-2025-58177","published":"2025-09-15","fixed":"1.107.0","kev":false},{"cve":"CVE-2025-62726","published":"2025-10-30","fixed":"1.113.0","kev":false,"link":{"from":"CVE-2025-58177","to":"CVE-2025-62726","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:n8n","fromFixed":"1.107.0","toFixed":"1.113.0","daysApart":45}]}},{"cve":"CVE-2025-61914","published":"2025-12-26","fixed":"1.114.0","kev":false},{"cve":"CVE-2025-61917","published":"2026-02-04","fixed":"1.114.3","kev":false}],"package":"npm:n8n"}}