{"id":"CVE-2025-58747","aliases":["CVE-2025-58747"],"related":[],"kind":"vulnerability","state":"published","title":"Dify MCP OAuth Flow Vulnerable to XSS","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"es","text":"Dify es una plataforma de desarrollo de aplicaciones LLM. En las versiones de Dify hasta la 1.9.1 incluida, el componente OAuth de MCP es vulnerable a Cross-site Scripting (XSS) cuando una víctima se conecta a un servidor MCP remoto controlado por un atacante. La vulnerabilidad existe en la implementación del flujo de OAuth, donde la ’authorization_url’ proporcionada por un servidor MCP remoto se pasa directamente a ’window.open’ sin validación ni saneamiento. Un atacante puede crear un servidor MCP malicioso que devuelve una URI de JavaScript (como ’javascript_protocol: alert(  1  )’) en el campo ’authorization_url’, que luego se ejecuta cuando la víctima intenta conectarse al servidor MCP. Esto permite al atacante ejecutar JavaScript arbitrario en el contexto de la aplicación Dify.","source":"nvd"}],"published":"2025-10-17T15:48:04.980Z","modified":"2026-11-10T13:10:00.363Z","severity":{"scorer":"GitHub_M","scheme":"CVSS: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","score":2,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS: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","score":2,"rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"<= 1.9.1","status":"affected"}],"vendor":"langgenius","product":"dify","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"1.9.2"}],"vendor":"langgenius","product":"dify","cpe":"cpe:2.3:a:langgenius:dify:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/langgenius/dify/security/advisories/GHSA-9jch-j9qf-vqfw","tags":["exploit","vendor-advisory","x-refsource-confirm"],"sources":["cvelist","nvd"]},{"url":"https://github.com/langgenius/dify/commit/bfda4ce7e6f39d43a4420e97e23a18edcfe3e3d3","tags":["patch","x-refsource-misc"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-10-17T15:58:24.874Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-58747","url":"https://www.cve.org/CVERecord?id=CVE-2025-58747","licence":"CVE Terms of Use","modified":"2025-10-17T15:58:42.220Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-58747","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-58747","licence":"Public domain","modified":"2026-11-10T13:10:00.363Z"}],"updatedAt":"2026-11-25T22:59:06.530Z","epss":{"score":0.06501,"percentile":0.93908,"date":"2026-12-01T12:00:22.000Z"}}