CVE-2025-58747
What it is
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.
At a glance
- Exploitability
- Can be exploited over the network without logging in, but needs a user to act. Limited direct impact.
- Exploit odds
- 5.7% chance of exploitation in the next 30 days (EPSS).
- Fix
- A patch, advisory or fixed version is referenced. Upgrade or apply it.
Timeline
- PublishedDisclosed publicly on CVE.org and NVD
- Last updatedMost recent change to the record
Why it ranks here
- Exploited in the wild: no, CISA does not list it.
- Exploit odds: 5.7% in the next 30 days (EPSS).
- Severity: 2.0 LOW (CVSS).
- Fix: a patch or advisory is linked.
Details
- Published
- Last modified
- Exploit probability
- 5.7% · EPSS, next 30 days
- Weakness
- CWE-79 · Cross-site scripting
- Record status
- Analyzed
Affected
- Langgenius Dify < 1.9.2
Attack profile CVSS 4.0 · 2.0
- Attack vector
- Network
- Complexity
- Low
- Attack requirements
- None
- Privileges needed
- None
- User interaction
- Active
- Confidentiality
- None
- Integrity
- None
- Availability
- None
Raw 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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Is it in your code?
Hand this to your coding agent. It searches your project for the affected products and checks versions. Nothing leaves your machine.
Read https://cve-list.com/agent/cve/CVE-2025-58747.md and follow it. Check whether this project is affected by CVE-2025-58747. Read only. Don't change anything and don't upload my code. Tell me yes, no or not sure, with the file as proof.
Fix and advisories
- https://github.com/langgenius/dify/commit/bfda4ce7e6f39d43a4420e97e23a18edcfe3e3d3
- https://github.com/langgenius/dify/security/advisories/GHSA-9jch-j9qf-vqfw