{"cve":"CVE-2021-43861","nvd":{"published":"2021-12-30T14:15:07.547","modified":"2026-06-17T04:11:35.683","status":"Modified","description":"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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4},"cwes":["CWE-20","CWE-79"],"references":["https://github.com/mermaid-js/mermaid/commit/066b7a0d0bda274d94a2f2d21e4323dab5776d83","https://github.com/mermaid-js/mermaid/releases/tag/8.13.8","https://github.com/mermaid-js/mermaid/security/advisories/GHSA-p3rp-vmj9-gv6v","https://github.com/mermaid-js/mermaid/commit/066b7a0d0bda274d94a2f2d21e4323dab5776d83","https://github.com/mermaid-js/mermaid/releases/tag/8.13.8"],"products":["mermaid_project:mermaid"],"source":"nvd","synced_at":"2026-10-19T21:26:33.761856376+00:00"},"epss":{"cve":"CVE-2021-43861","score":0.00938,"percentile":0.60893,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-p3rp-vmj9-gv6v","url":"https://osv.dev/vulnerability/GHSA-p3rp-vmj9-gv6v","summary":"Incorrect sanitisation function leads to `XSS` in mermaid","modified":"2026-07-08T06:28:14.087175466Z","packages":[{"ecosystem":"npm","name":"mermaid","purl":"pkg:npm/mermaid","ranges":["<8.13.8"],"fixed":["8.13.8"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}