Medium severityOSV Advisory· Published Aug 19, 2025· Updated Apr 15, 2026
CVE-2025-54881
CVE-2025-54881
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. In the default configuration of mermaid 10.9.0-rc.1 to 11.9.0, user supplied input for sequence diagram labels is passed to innerHTML during calculation of element size, causing XSS.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
mermaidnpm | >= 11.0.0-alpha.1, < 11.10.0 | 11.10.0 |
mermaidnpm | >= 10.9.0-rc.1, < 10.9.4 | 10.9.4 |
Affected products
8- Range: 0.1.0, 0.1.1, 0.2.0, …
- osv-coords7 versionspkg:apk/chainguard/langfusepkg:apk/chainguard/langfuse-compatpkg:apk/chainguard/langfuse-workerpkg:apk/wolfi/langfusepkg:apk/wolfi/langfuse-compatpkg:apk/wolfi/langfuse-workerpkg:npm/mermaid
< 3.102.0-r0+ 6 more
- (no CPE)range: < 3.102.0-r0
- (no CPE)range: < 3.102.0-r0
- (no CPE)range: < 3.102.0-r0
- (no CPE)range: < 3.102.0-r0
- (no CPE)range: < 3.102.0-r0
- (no CPE)range: < 3.102.0-r0
- (no CPE)range: >= 11.0.0-alpha.1, < 11.10.0
Patches
Vulnerability mechanics
References
5- github.com/advisories/GHSA-7rqq-prvp-x9jhghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-54881ghsaADVISORY
- github.com/mermaid-js/mermaid/commit/5c69e5fdb004a6d0a2abe97e23d26e223a059832nvdWEB
- github.com/mermaid-js/mermaid/commit/685516a85ec1df64cefd4fd15f26533be87d458envdWEB
- github.com/mermaid-js/mermaid/security/advisories/GHSA-7rqq-prvp-x9jhnvdWEB
News mentions
0No linked articles in our index yet.