Vulnerability · Published Oct 17, 2025 · Assigned by GitHub_M

CVE-2025-58747Dify MCP OAuth Flow Vulnerable to XSS

Low 2.0

In plain English

A low-severity cross-site scripting in dify from langgenius. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 6.0% (higher than 93% of all known vulnerabilities).

Severity (CVSS 4.0)2.0Low
Exploit odds (30 days)6.0%top 6.6% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

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 products (as reported)

VendorProductVersions
langgenius dify <= 1.9.1

Weakness: CWE-79 · 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

References