{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0c4233e7df51f146b9d007132f3aca71d36919cb"
            }
          ],
          "repo": "https://github.com/langgenius/dify",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-qpv6-75c2-75h4"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-79"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/21xxx/CVE-2026-21866.json"
  },
  "details": "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.",
  "id": "CVE-2026-21866",
  "modified": "2026-04-01T23:09:53.075498550Z",
  "published": "2026-03-03T21:42:25.311Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/21xxx/CVE-2026-21866.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/langgenius/dify/security/advisories/GHSA-qpv6-75c2-75h4"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-21866"
    },
    {
      "type": "FIX",
      "url": "https://github.com/langgenius/dify/commit/ae17537470bba417a8971fff705dd82ecb043564"
    },
    {
      "type": "FIX",
      "url": "https://github.com/langgenius/dify/pull/29811"
    }
  ],
  "schema_version": "1.7.3",
  "severity": [
    {
      "score": "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",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Dify - Stored XSS in chat"
}