Dify MCP OAuth Flow Vulnerable to XSS
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Active
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- None · None · None
- Fix status
- No fix listed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-79.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| langgenius | dify | up to 1.9.1 | — | No fix listed | CNA |
- dify Vendorlanggenius Affected up to 1.9.1 Fixed in — No fix listed CNA
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:langgenius:dify:*:*:*:*:*:node.js:*:* | before 1.9.2 | Vulnerable | langgenius |
- cpe:2.3:a:langgenius:dify:*:*:*:*:*:node.js:*:* Versions before 1.9.2 Vulnerable ·langgenius
Remediation
No fixed version listed by the sources yet.
Timeline
- 2026-10-02 Threatist record created from CVE-2025-58747
References
More langgenius Dify vulnerabilities
- TI-2025-35265 Default credentials in Dify thru 1.5.1. CVSS 3.1CRITICAL 9.8
- TI-2025-03045 Unsanitized Input in langgenius/dify CVSS 3.1HIGH 7.2
- TI-2025-01548 Admin account takeover through weak Pseudo-Random number generator used in generating… CVSS 3.1HIGH 8.8
- TI-2026-30470 Dify Vulnerable to Stored XSS via SVG-file upload CVSS 4.0MEDIUM 6.9
- TI-2024-11840 Authentication Bypass in langgenius/dify CVSS 3.0HIGH 8.1
- TI-2024-11170 Improper Restriction of Excessive Authentication Attempts in langgenius/dify CVSS 3.1HIGH 8.1
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences