{"id":"GHSA-p3rp-vmj9-gv6v","revision":"3a27a2fab5074552a1cc5f5858ddf536","records":[{"revision":"3a27a2fab5074552a1cc5f5858ddf536","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-p3rp-vmj9-gv6v","aliases":["CVE-2021-43861"],"title":"Incorrect sanitisation function leads to `XSS` in mermaid","description":"### Impact\nMalicious diagrams can contain javascript code that can be run at diagram readers machines.\n\n### Patches\nThe users should upgrade to version 8.13.8\n\n### Workarounds\nYou need to upgrade in order to avoid this issue.\n","state":0,"publishedAt":"2022-01-06T19:45:59+00:00","modifiedAt":"2026-07-08T06:28:14.0871755+00:00","affected":[{"ecosystem":"npm","name":"mermaid","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"8.13.8"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/mermaid-js/mermaid/security/advisories/GHSA-p3rp-vmj9-gv6v","https://nvd.nist.gov/vuln/detail/CVE-2021-43861","https://github.com/mermaid-js/mermaid/commit/066b7a0d0bda274d94a2f2d21e4323dab5776d83","https://github.com/mermaid-js/mermaid","https://github.com/mermaid-js/mermaid/releases/tag/8.13.8"],"sourceUrl":"https://github.com/advisories/GHSA-p3rp-vmj9-gv6v","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-p3rp-vmj9-gv6v","identifiers":["GHSA-p3rp-vmj9-gv6v","CVE-2021-43861"]},"retained":false,"historicalAffected":[]}],"coverage":[]}