HIGH7.2
GHSA-p3rp-vmj9-gv6v
Incorrect sanitisation function leads to `XSS` in mermaid
Quick fix
GHSA-p3rp-vmj9-gv6v — mermaid: upgrade to the fixed version with the command below.
npm install mermaid@8.13.8Details
### 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.
Are you affected?
Enter the version of the package you're using.
Affected packages
References
- https://github.com/mermaid-js/mermaid/security/advisories/GHSA-p3rp-vmj9-gv6v[WEB]
- https://nvd.nist.gov/vuln/detail/CVE-2021-43861[ADVISORY]
- https://github.com/mermaid-js/mermaid/commit/066b7a0d0bda274d94a2f2d21e4323dab5776d83[WEB]
- https://github.com/mermaid-js/mermaid[PACKAGE]
- https://github.com/mermaid-js/mermaid/releases/tag/8.13.8[WEB]
Check it before you install it
One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.
curl -s https://vdb.ai.kr/v1/ai/check-packages \
-H 'Content-Type: application/json' \
-d '{"packages":["pkg:npm/mermaid"]}'