CVE-2025-58747

published 17 Oct 2025 · updated 10 Nov 2026

Dify MCP OAuth Flow Vulnerable to XSS

3.0LowCVSS 2.0EPSS 6%1 public exploits

A public exploit exists; no exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 6%. Fixed in 1.9.2.

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.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
langgeniusdify<1.9.21.9.2
langgenius<=1.9.1

Exploit evidence

1 public sources

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2025-58747 severity on Zeptric[![CVE-2025-58747](https://zeptric.io/badge/cve/CVE-2025-58747.svg)](https://zeptric.io/cve/CVE-2025-58747)