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: 5.1 [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]
CVE-ID: CVE-2026-21866
CWE-ID: CWE-79
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

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.


Affected software

Dify

How to mitigate CVE-2026-21866

Install security update from vendor's website.

Dify - update to 1.11.2

External References

Related Security Bulletins