{"id":"CVE-2025-58747","published":"2025-10-17T15:48:04Z","modified":"2025-10-17T15:58:42Z","title":"Dify MCP OAuth Flow Vulnerable to XSS","vendor":"langgenius","product":"dify","tier":"tail","description":{"text":"Dify is an LLM application development platform. In Dify versions through 1.9.1, the MCP OAuth component is vulnerable to cross-site scripting when a victim connects to an attacker-controlled remote MCP server. The vulnerability exists in the OAuth flow implementation where the authorization_url provided by a remote MCP server is directly passed to window.open without validation or sanitization. An attacker can craft a malicious MCP server that returns a JavaScript URI (such as javascript:alert(1)) in the authorization_url field, which is then executed when the victim attempts to connect to the MCP server. This allows the attacker to execute arbitrary JavaScript in the context of the Dify application.","provenance":"source","from":"CVE.org"},"cvss":{"score":2,"severity":"LOW","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:P","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.06014,"percentile":0.9351,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/langgenius/dify/security/advisories/GHSA-9jch-j9qf-vqfw","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/langgenius/dify/commit/bfda4ce7e6f39d43a4420e97e23a18edcfe3e3d3","tags":["x_refsource_MISC"]}],"priority":{"score":20.1,"factors":[{"name":"EPSS percentile","points":18.7},{"name":"CVSS severity","points":1.4}]},"vendorSlug":"langgenius","affectedVersions":[{"vendor":"langgenius","product":"dify","versions":["<= 1.9.1"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-10-17T15:58:24.874703Z","from":"CISA ADP","provenance":"source"},"summary":{"text":"Dify's MCP OAuth component, in versions through 1.9.1, passes the authorization_url supplied by a remote MCP server directly to window.open without validation or sanitisation, which enables cross-site scripting. An attacker who controls a remote MCP server can return a javascript: URI in that field, so a victim who connects to the server with network access and no authentication must take a user-interaction step, and the script then runs in the context of the Dify application.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:34:34Z"},"euvd":{"id":"EUVD-2025-34897","exploited":false,"provenance":"source"}}