XSS in Dify

CVE-2026-21866

Dify is an open-source LLM app development platform. Prior to 1.11.2, Dify is vulnerable to a stored XSS issue when rendering Mermaid diagrams within chats. This occurs because Dify’s default Mermaid configuration uses securityLevel: loose, which allows potentially unsafe content to execute. This vulnerability is fixed in 1.11.2.

Vulnerability class: XSS (Cross-Site Scripting)

EPSS: 0.002 (12.4th percentile) — read the EPSS interpretation.

CVSS v3 metric

CVSS v3 base score 5.4 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N.

Affected products

Weakness classification (CWE)

References

Frequently asked questions

What is CVE-2026-21866?
CVE-2026-21866 is a medium-severity vulnerability in Dify, classified under Cross-site Scripting. CVSS score: 5.4/10. Published 2026-03-03.
How severe is CVE-2026-21866?
Medium severity. CVSS v3 base score is 5.4 out of 10.