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

- Severity: Low 2.0 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 6.50%, higher than 93% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-10-17T15:48:04.980Z
- Modified: 2026-11-10T13:10:00.363Z
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- langgenius dify: <= 1.9.1; before 1.9.2

## Every score

- GitHub_M: CVSS:4.0 2.0 Low `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`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/langgenius/dify/security/advisories/GHSA-9jch-j9qf-vqfw> (exploit, vendor-advisory)
- <https://github.com/langgenius/dify/commit/bfda4ce7e6f39d43a4420e97e23a18edcfe3e3d3> (patch)

## Sources

- CVE List: [CVE-2025-58747](https://www.cve.org/CVERecord?id=CVE-2025-58747), CVE Terms of Use, modified 2025-10-17
- NVD: [CVE-2025-58747](https://nvd.nist.gov/vuln/detail/CVE-2025-58747), Public domain, modified 2026-11-10

---

Page: https://cve.day/CVE-2025-58747 · Whole record: https://cve.day/CVE-2025-58747.json · Rebuilt by cve.day 2026-11-25T22:59:06.530Z
