Staging Environment: Content and features may be unstable or change without notice.
Search for packages
Package details: pkg:npm/mermaid@8.0.0-alpha.2
purl pkg:npm/mermaid@8.0.0-alpha.2
Next non-vulnerable version 10.9.4
Latest non-vulnerable version 11.10.0
Risk 4.0
Vulnerabilities affecting this package (5)
Vulnerability Summary Fixed by
VCID-9hch-63av-c3e2
Aliases:
GHSA-w32g-5hqp-gg6q
GMS-2020-747
Cross-Site Scripting in mermaid Versions of `mermaid` prior to 8.2.3 are vulnerable to Cross-Site Scripting. If malicious input such as `A["<img src=invalid onerror=alert('XSS')></img>"] ` is provided to the application, it will execute the code instead of rendering it as text due to improper output encoding. ## Recommendation Upgrade to version 8.2.3 or later
8.2.3
Affected by 4 other vulnerabilities.
VCID-fgz4-kbun-23bn
Aliases:
CVE-2021-43861
GHSA-p3rp-vmj9-gv6v
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') Mermaid is a Javascript based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create and modify complex diagrams., malicious diagrams can run javascript code at diagram readers' machines. Users should upgrade to to receive a patch. There are no known workarounds aside from upgrading.
8.13.8
Affected by 2 other vulnerabilities.
VCID-fwuk-z3uk-1ygf
Aliases:
GHSA-m4gq-x24j-jpmf
Prototype pollution vulnerability found in Mermaid's bundled version of DOMPurify The following bundled files within the Mermaid NPM package contain a bundled version of DOMPurify that is vulnerable to https://github.com/cure53/DOMPurify/security/advisories/GHSA-mmhx-hmjr-r674, potentially resulting in an XSS attack. This affects the built: - `dist/mermaid.min.js` - `dist/mermaid.js` - `dist/mermaid.esm.mjs` - `dist/mermaid.esm.min.mjs` This will also affect users that use the above files via a CDN link, e.g. `https://cdn.jsdelivr.net/npm/mermaid@10.9.2/dist/mermaid.min.js` **Users that use the default NPM export of `mermaid`, e.g. `import mermaid from 'mermaid'`, or the `dist/mermaid.core.mjs` file, do not use this bundled version of DOMPurify, and can easily update using their package manager with something like `npm audit fix`.** ### Patches - `develop` branch: 6c785c93166c151d27d328ddf68a13d9d65adc00 - backport to v10: 92a07ffe40aab2769dd1c3431b4eb5beac282b34
10.9.3
Affected by 1 other vulnerability.
11.0.0-alpha.1
Affected by 1 other vulnerability.
VCID-hbtz-4sw3-63dt
Aliases:
GMS-2019-1
Cross-Site Scripting If malicious input such as `A["<img src=invalid onerror=alert('XSS')></img>"]` is provided to the application, it will execute the code instead of rendering it as text due to improper output encoding.
8.2.3
Affected by 4 other vulnerabilities.
VCID-x94b-cysu-4fbe
Aliases:
CVE-2021-35513
GHSA-4f6x-49g2-99fm
Cross-site Scripting in Mermaid Mermaid before 8.11.0 allows XSS when the antiscript feature is used.
8.11.0
Affected by 3 other vulnerabilities.
Vulnerabilities fixed by this package (0)
Vulnerability Summary Aliases
This package is not known to fix vulnerabilities.

Date Actor Action Vulnerability Source VulnerableCode Version
2026-04-16T23:12:10.545116+00:00 GitLab Importer Affected by VCID-fwuk-z3uk-1ygf https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/mermaid/GHSA-m4gq-x24j-jpmf.yml 38.4.0
2026-04-16T21:36:50.946740+00:00 GitLab Importer Affected by VCID-fgz4-kbun-23bn https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/mermaid/CVE-2021-43861.yml 38.4.0
2026-04-16T21:26:49.942716+00:00 GitLab Importer Affected by VCID-x94b-cysu-4fbe https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/mermaid/CVE-2021-35513.yml 38.4.0
2026-04-16T21:07:55.877954+00:00 GitLab Importer Affected by VCID-9hch-63av-c3e2 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/mermaid/GMS-2020-747.yml 38.4.0
2026-04-16T20:54:18.082154+00:00 GitLab Importer Affected by VCID-hbtz-4sw3-63dt https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/mermaid/GMS-2019-1.yml 38.4.0
2026-04-12T00:30:37.508020+00:00 GitLab Importer Affected by VCID-fwuk-z3uk-1ygf https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/mermaid/GHSA-m4gq-x24j-jpmf.yml 38.3.0
2026-04-11T22:50:46.399184+00:00 GitLab Importer Affected by VCID-fgz4-kbun-23bn https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/mermaid/CVE-2021-43861.yml 38.3.0
2026-04-11T22:39:45.391643+00:00 GitLab Importer Affected by VCID-x94b-cysu-4fbe https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/mermaid/CVE-2021-35513.yml 38.3.0
2026-04-11T22:19:36.730395+00:00 GitLab Importer Affected by VCID-9hch-63av-c3e2 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/mermaid/GMS-2020-747.yml 38.3.0
2026-04-11T22:05:15.113216+00:00 GitLab Importer Affected by VCID-hbtz-4sw3-63dt https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/mermaid/GMS-2019-1.yml 38.3.0
2026-04-03T00:38:16.689428+00:00 GitLab Importer Affected by VCID-fwuk-z3uk-1ygf https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/mermaid/GHSA-m4gq-x24j-jpmf.yml 38.1.0
2026-04-02T23:00:09.016886+00:00 GitLab Importer Affected by VCID-fgz4-kbun-23bn https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/mermaid/CVE-2021-43861.yml 38.1.0
2026-04-02T22:50:19.317309+00:00 GitLab Importer Affected by VCID-x94b-cysu-4fbe https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/mermaid/CVE-2021-35513.yml 38.1.0
2026-04-02T22:31:35.912770+00:00 GitLab Importer Affected by VCID-9hch-63av-c3e2 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/mermaid/GMS-2020-747.yml 38.1.0
2026-04-02T22:18:07.699590+00:00 GitLab Importer Affected by VCID-hbtz-4sw3-63dt https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/mermaid/GMS-2019-1.yml 38.1.0
2026-04-01T17:18:54.143848+00:00 GitLab Importer Affected by VCID-fgz4-kbun-23bn https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/mermaid/CVE-2021-43861.yml 38.0.0
2026-04-01T17:08:17.722025+00:00 GitLab Importer Affected by VCID-x94b-cysu-4fbe https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/mermaid/CVE-2021-35513.yml 38.0.0
2026-04-01T16:35:48.489460+00:00 GitLab Importer Affected by VCID-hbtz-4sw3-63dt https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/mermaid/GMS-2019-1.yml 38.0.0