# CVE-2026-21866: Dify - Stored XSS in chat

- Severity: Medium 5.1 (CVSS:4.0, scored by GitHub_M) `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`
- 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): 0.25%, higher than 17% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-03-03T21:42:25.311Z
- Modified: 2026-06-17T10:19:03.427Z
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- langgenius dify: < 1.11.2
- dify dify: before 1.11.2

## Every score

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

## References

- <https://github.com/langgenius/dify/security/advisories/GHSA-qpv6-75c2-75h4> (exploit, vendor-advisory)
- <https://github.com/langgenius/dify/pull/29811> (issue-tracking, patch)
- <https://github.com/langgenius/dify/commit/ae17537470bba417a8971fff705dd82ecb043564> (patch)

## Sources

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

---

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