{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "versions": [
              {
                "introduced": "0"
              },
              {
                "fixed": "8.13.8"
              }
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "65592e0541790968703f16bc0b91a641b5443111"
            },
            {
              "fixed": "066b7a0d0bda274d94a2f2d21e4323dab5776d83"
            }
          ],
          "repo": "https://github.com/mermaid-js/mermaid",
          "type": "GIT"
        }
      ]
    }
  ],
  "details": "Mermaid is a Javascript based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create and modify complex diagrams. Prior to version 8.13.8, malicious diagrams can run javascript code at diagram readers' machines. Users should upgrade to version 8.13.8 to receive a patch. There are no known workarounds aside from upgrading.",
  "id": "CVE-2021-43861",
  "modified": "2026-04-01T23:10:09.856933464Z",
  "published": "2021-12-30T14:15:07.547Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/mermaid-js/mermaid/releases/tag/8.13.8"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/mermaid-js/mermaid/security/advisories/GHSA-p3rp-vmj9-gv6v"
    },
    {
      "type": "FIX",
      "url": "https://github.com/mermaid-js/mermaid/commit/066b7a0d0bda274d94a2f2d21e4323dab5776d83"
    }
  ],
  "related": [
    "GHSA-p3rp-vmj9-gv6v"
  ],
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ]
}