Cross-site scripting in Dify - CVE-2026-21866

 

Cross-site scripting in Dify - CVE-2026-21866

Published: July 27, 2026


Vulnerability identifier: #VU139800
CSH Severity: Low
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:U/U:Clear
CVE-ID: CVE-2026-21866
CWE-ID: CWE-79
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: LangGenius
Affected software:
Dify

Detailed vulnerability description

The vulnerability allows a remote user to disclose sensitive information.

The vulnerability exists due to cross-site scripting in the Mermaid diagram rendering component when rendering Mermaid diagrams within chat conversations. A remote user can create a malicious chat containing a javascript: payload to disclose sensitive information.

User interaction is required to click the generated element in a shared chat.


How to mitigate CVE-2026-21866

Install security update from vendor's website.

Sources