CVE-2025-58177 — Stored XSS in n8n — CVE Details
Stored XSS in n8n LangChain Chat Trigger Node via initialMessages Parameter
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.41%). Schedule for your next planned update.
Does your project use an affected n8n version?
Paste your package-lock.json to check it for CVE-2025-58177 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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
Advisory Timeline
- First published September 15, 2025 (437 days ago).
- Last revised September 15, 2025 — 0 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
npm install n8n@1.107.0
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: npm (1).
| Package | Fixed In |
|---|---|
| n8n npm · Affected: All versions | 1.107.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-79Cross-site Scripting (XSS)MITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 4.1 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N
References
- https://github.com/n8n-io/n8n/security/advisories/GHSA-mvh4-2cm2-6hpgWEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-58177ADVISORY
- https://github.com/n8n-io/n8n/pull/18148WEB
- https://github.com/n8n-io/n8n/commit/d4ef191be0b39b65efa68559a3b8d5dad2e102b2WEB
- https://docs.n8n.io/hosting/securing/blocking-nodesWEB
- https://github.com/n8n-io/n8nPACKAGE
Frequently Asked Questions
- What is CVE-2025-58177?
- Stored XSS in n8n LangChain Chat Trigger Node via initialMessages Parameter. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 4.1/10).
- How do I check if my project is affected by CVE-2025-58177?
- CVE-2025-58177 affects n8n. It has a 0.4% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-58177 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is a below-median EPSS score — only 26.8% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-44790CRITICAL
n8n Has an Arbitrary File Read via Git Node
- CVE-2025-61914HIGH
n8n's Possible Stored XSS in "Respond to Webhook" Node May Execute Outside iframe Sandbox
- CVE-2026-86076HIGH
n8n: Expression Sandbox Escape via Class-Field Sanitizer Rebinding Can Lead to Code Execution
- CVE-2026-65599MEDIUM
n8n: Google Service Account Private Key Exposed in JWT Header
- CVE-2026-65593MEDIUM
n8n: Authenticated SSRF via Dynamic Node Parameters Endpoints Allows Internal Network Access
- CVE-2026-59257MEDIUM
n8n: MySQL v1 Node executeQuery Operation Allows SQL Injection via Unparameterized Expression Interpolation
- CVE-2026-86074MEDIUM
n8n: Instance AI Credential Setup Accepts Unvalidated Probe URL from Fetched Content
- CVE-2026-65594MEDIUM
n8n: Member-Level Users Can Execute Other Users' MCP Server Trigger Workflows via Missing OAuth Authorization Check