CVE-2025-58747: langgenius dify · Cross-site Scripting
Affects langgenius difySource CVE Database V5
Not known to be exploited · CVSS 2.0 Low.
Data as of 25 Oct 2026, 19:02 UTC
- EPSS
- 5.7% chance of exploitation in 30 days – higher than 92% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
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:PExploitation evidence
Disclosed: evidence found.
CVE published 17 Oct 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-25.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
GitHublanggenius/difypkg:github/langgenius/difyOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
1. Avoid connecting to untrusted or unknown MCP OAuth servers within the dify platform until a patch is available. 2. Implement network-level controls to restrict connections to only trusted MCP servers. 3. Monitor user activity for unusual OAuth connection attempts or unexpected redirects. 4. Encourage users to report suspicious authorization prompts or unexpected behavior during OAuth flows. 5. Once available, promptly apply security patches or updates from langgenius addressing this vulnerability. 6. Consider implementing additional client-side input validation or sanitization in custom deployments or forks of dify. 7. Educate developers and users about the risks of connecting to untrusted third-party OAuth providers. 8. Employ Content Security Policy (CSP) headers to restrict script execution sources in the dify application environment, mitigating the impact of potential XSS attacks.
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.