NodeJS/mermaid/8.0.0-alpha.4
Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.
https://www.npmjs.com/package/mermaid
MIT
4 Security Vulnerabilities
Cross-site Scripting in Mermaid
- https://nvd.nist.gov/vuln/detail/CVE-2021-35513
- https://github.com/mermaid-js/mermaid/issues/2122
- https://github.com/mermaid-js/mermaid/pull/2123
- https://github.com/mermaid-js/mermaid/pull/2123/commits/3d22fa5d2435de5acc18de6f88474a6e8675a60e
- https://github.com/mermaid-js/mermaid/releases/tag/8.11.0-rc2
- https://github.com/advisories/GHSA-4f6x-49g2-99fm
Mermaid before 8.11.0 allows XSS when the antiscript feature is used.
Prototype pollution vulnerability found in Mermaid's bundled version of DOMPurify
- https://github.com/cure53/DOMPurify/security/advisories/GHSA-mmhx-hmjr-r674
- https://github.com/mermaid-js/mermaid/security/advisories/GHSA-m4gq-x24j-jpmf
- https://github.com/mermaid-js/mermaid/commit/6c785c93166c151d27d328ddf68a13d9d65adc00
- https://github.com/mermaid-js/mermaid/commit/92a07ffe40aab2769dd1c3431b4eb5beac282b34
- https://github.com/advisories/GHSA-m4gq-x24j-jpmf
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
Incorrect sanitisation function leads to `XSS` in mermaid
- 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/releases/tag/8.13.8
- https://github.com/advisories/GHSA-p3rp-vmj9-gv6v
Impact
Malicious diagrams can contain javascript code that can be run at diagram readers machines.
Patches
The users should upgrade to version 8.13.8
Workarounds
You need to upgrade in order to avoid this issue.
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
235 Other Versions
Version | License | Security | Released | |
---|---|---|---|---|
11.4.0 | MIT | 2024-10-30 - 15:43 | 15 days | |
11.3.0 | MIT | 2024-10-03 - 14:43 | about 1 month | |
11.2.1 | MIT | 2024-09-16 - 16:41 | about 2 months | |
11.2.0 | MIT | 2024-09-09 - 13:23 | 2 months | |
11.1.1 | MIT | 2024-09-06 - 17:19 | 2 months | |
11.1.0 | MIT | 2024-09-02 - 15:18 | 2 months | |
11.0.2 | MIT | 2024-08-24 - 07:06 | 3 months | |
11.0.1 | MIT | 2024-08-23 - 15:04 | 3 months | |
11.0.0 | MIT | 2024-08-23 - 12:12 | 3 months | |
11.0.0-alpha.7 | MIT | 2024-03-23 - 13:27 | 8 months | |
11.0.0-alpha.6 | MIT | 2023-11-26 - 15:49 | 12 months | |
11.0.0-alpha.5 | MIT | 2023-11-24 - 08:39 | 12 months | |
11.0.0-alpha.4 | MIT | 2023-08-16 - 05:32 | about 1 year | |
11.0.0-alpha.3 | MIT | 2023-08-14 - 03:42 | over 1 year | |
11.0.0-alpha.2 | MIT | 2023-08-12 - 16:02 | over 1 year | |
11.0.0-alpha.1 | MIT | 2023-08-12 - 10:56 | over 1 year | |
10.9.3 | MIT | 2024-10-22 - 08:56 | 24 days | |
10.9.2 | MIT | 1 | 2024-10-02 - 10:28 | about 1 month |
10.9.1 | MIT | 1 | 2024-05-14 - 10:58 | 6 months |
10.9.0 | MIT | 1 | 2024-03-05 - 17:25 | 8 months |
10.9.0-rc.2 | MIT | 1 | 2024-02-29 - 03:14 | 9 months |
10.9.0-rc.1 | MIT | 1 | 2024-02-27 - 08:51 | 9 months |
10.8.0 | MIT | 1 | 2024-02-02 - 10:32 | 10 months |
10.7.0 | MIT | 1 | 2024-01-15 - 09:02 | 10 months |
10.6.2-rc.3 | MIT | 1 | 2024-01-11 - 04:58 | 10 months |
10.6.2-rc.2 | MIT | 1 | 2023-12-04 - 06:52 | 12 months |
10.6.2-rc.1 | MIT | 1 | 2023-11-24 - 08:43 | 12 months |
10.6.1 | MIT | 1 | 2023-11-06 - 15:05 | about 1 year |
10.6.0 | MIT | 1 | 2023-10-25 - 11:29 | about 1 year |
10.5.1 | MIT | 1 | 2023-10-20 - 12:29 | about 1 year |
10.5.0 | MIT | 1 | 2023-10-02 - 08:02 | about 1 year |
10.5.0-rc.3 | MIT | 1 | 2023-10-02 - 07:50 | about 1 year |
10.5.0-rc.1 | MIT | 1 | 2023-09-14 - 08:38 | about 1 year |
10.5.0-alpha.1 | MIT | 1 | 2023-09-07 - 07:23 | about 1 year |
10.4.0 | MIT | 1 | 2023-08-25 - 12:21 | about 1 year |
10.3.1 | MIT | 1 | 2023-08-11 - 12:22 | over 1 year |
10.3.0 | MIT | 1 | 2023-07-26 - 07:47 | over 1 year |
10.3.0-rc.1 | MIT | 1 | 2023-07-26 - 06:07 | over 1 year |
10.2.4 | MIT | 1 | 2023-06-30 - 11:14 | over 1 year |
10.2.4-rc.1 | MIT | 1 | 2023-06-30 - 10:57 | over 1 year |
10.2.3 | MIT | 1 | 2023-06-08 - 14:27 | over 1 year |
10.2.3-rc.1 | MIT | 1 | 2023-06-08 - 14:21 | over 1 year |
10.2.2 | MIT | 1 | 2023-06-02 - 08:03 | over 1 year |
10.2.1 | MIT | 1 | 2023-06-01 - 11:11 | over 1 year |
10.2.1-rc.1 | MIT | 1 | 2023-06-01 - 09:22 | over 1 year |
10.2.0 | MIT | 1 | 2023-05-24 - 17:13 | over 1 year |
10.2.0-rc.4 | MIT | 1 | 2023-05-24 - 16:25 | over 1 year |
10.2.0-rc.3 | MIT | 1 | 2023-05-09 - 04:46 | over 1 year |
10.2.0-rc.2 | MIT | 1 | 2023-04-23 - 19:05 | over 1 year |
10.2.0-rc.1 | MIT | 1 | 2023-04-23 - 18:52 | over 1 year |
10.1.0 | MIT | 1 | 2023-04-04 - 13:17 | over 1 year |
10.1.0-rc.1 | MIT | 1 | 2023-04-03 - 12:46 | over 1 year |
10.0.3-alpha.1 | MIT | 1 | 2023-03-07 - 03:54 | over 1 year |
10.0.2 | MIT | 1 | 2023-03-02 - 12:45 | over 1 year |
10.0.2-rc.1 | MIT | 1 | 2023-03-01 - 17:45 | over 1 year |
10.0.1 | MIT | 1 | 2023-03-01 - 13:17 | over 1 year |
10.0.1-rc.5 | MIT | 1 | 2023-03-01 - 12:55 | over 1 year |
10.0.1-rc.4 | MIT | 1 | 2023-03-01 - 08:33 | over 1 year |
10.0.1-rc.3 | MIT | 1 | 2023-02-28 - 14:34 | over 1 year |
10.0.1-rc.2 | MIT | 1 | 2023-02-24 - 14:16 | over 1 year |
10.0.1-rc.1 | MIT | 1 | 2023-02-24 - 12:57 | over 1 year |
10.0.0 | MIT | 1 | 2023-02-21 - 09:21 | over 1 year |
10.0.0-rc.4 | MIT | 1 | 2023-02-19 - 17:01 | over 1 year |
10.0.0-rc.3 | MIT | 1 | 2023-02-19 - 14:36 | over 1 year |
10.0.0-rc.2 | MIT | 1 | 2023-02-19 - 13:05 | over 1 year |
10.0.0-rc.1 | MIT | 1 | 2023-02-19 - 08:41 | over 1 year |
9.4.3 | MIT | 1 | 2023-03-07 - 18:40 | over 1 year |
9.4.2 | MIT | 1 | 2023-03-07 - 15:50 | over 1 year |
9.4.2-rc.2 | MIT | 1 | 2023-02-28 - 16:21 | over 1 year |
9.4.2-rc.1 | MIT | 1 | 2023-02-18 - 18:20 | over 1 year |
9.4.0 | MIT | 1 | 2023-02-15 - 15:18 | over 1 year |
9.4.0-rc.2 | MIT | 1 | 2023-02-10 - 10:12 | almost 2 years |
9.4.0-rc.1 | MIT | 1 | 2023-01-30 - 09:18 | almost 2 years |
9.3.0 | MIT | 1 | 2022-12-15 - 09:19 | almost 2 years |
9.3.0-rc.7 | MIT | 1 | 2022-12-15 - 03:43 | almost 2 years |
9.3.0-rc.6 | MIT | 1 | 2022-12-14 - 04:16 | almost 2 years |
9.3.0-rc.5 | MIT | 1 | 2022-12-13 - 08:13 | almost 2 years |
9.3.0-rc.4 | MIT | 1 | 2022-12-12 - 19:09 | almost 2 years |
9.3.0-rc.3 | MIT | 1 | 2022-12-12 - 18:54 | almost 2 years |
9.3.0-rc.2 | MIT | 1 | 2022-12-12 - 18:26 | almost 2 years |
9.3.0-rc.1 | MIT | 1 | 2022-12-08 - 14:12 | almost 2 years |
9.2.3-rc.1 | MIT | 1 | 2022-11-16 - 07:45 | almost 2 years |
9.2.2 | MIT | 1 | 2022-11-09 - 15:21 | about 2 years |
9.2.2-rc.2 | MIT | 1 | 2022-11-09 - 09:30 | about 2 years |
9.2.1 | MIT | 1 | 2022-11-08 - 15:48 | about 2 years |
9.2.0 | MIT | 1 | 2022-11-01 - 14:15 | about 2 years |
9.2.0-rc10 | MIT | 1 | 2022-10-28 - 07:49 | about 2 years |
9.2.0-rc9 | MIT | 1 | 2022-10-24 - 08:33 | about 2 years |
9.2.0-rc8 | MIT | 1 | 2022-10-20 - 04:54 | about 2 years |
9.2.0-rc7 | MIT | 1 | 2022-10-19 - 06:03 | about 2 years |
9.2.0-rc6 | MIT | 1 | 2022-10-14 - 13:24 | about 2 years |
9.2.0-rc5 | MIT | 1 | 2022-10-12 - 07:38 | about 2 years |
9.2.0-rc4 | MIT | 1 | 2022-10-11 - 09:24 | about 2 years |
9.2.0-rc3 | MIT | 1 | 2022-10-11 - 07:30 | about 2 years |
9.2.0-rc2 | MIT | 1 | 2022-09-28 - 11:04 | about 2 years |
9.2.0-rc1 | MIT | 1 | 2022-09-09 - 13:15 | about 2 years |
9.1.7 | MIT | 1 | 2022-09-13 - 17:50 | about 2 years |
9.1.6 | MIT | 1 | 2022-08-18 - 18:41 | about 2 years |
9.1.5 | MIT | 1 | 2022-08-11 - 18:31 | over 2 years |
9.1.4 | MIT | 1 | 2022-08-04 - 18:35 | over 2 years |