# CVE-2025-54880: Mermaid does not properly sanitize architecture diagram iconText leading to XSS

- Severity: Medium 5.1 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.47%, higher than 42% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-08-19T16:58:41.120Z
- Modified: 2026-08-07T08:12:20.025Z
- Also known as: GHSA-8gwm-58g9-j8pw
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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 11.9.0 and earlier, user supplied input for architecture diagram icons is passed to the d3 html() method, creating a sink for cross site scripting. This vulnerability is fixed in 11.10.0.

(As written by CVE List.)

## Affected

- mermaid-js mermaid: >= 11.1.0, < 11.10.0
- mermaid (npm): from 11.1.0 before 11.10.0
- mermaid_project mermaid: from 11.1.0 before 11.10.0

## Every score

- GitHub_M: CVSS:4.0 5.1 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/mermaid-js/mermaid/security/advisories/GHSA-8gwm-58g9-j8pw> (exploit, patch, vendor-advisory, web)
- <https://github.com/mermaid-js/mermaid/commit/2aa83302795183ea5c65caec3da1edd6cb4791fc> (patch, web)
- <https://github.com/mermaid-js/mermaid/commit/734bde38777c9190a5a72e96421c83424442d4e4> (product, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-54880> (advisory)
- <https://github.com/mermaid-js/mermaid> (package)

## Sources

- CVE List: [CVE-2025-54880](https://www.cve.org/CVERecord?id=CVE-2025-54880), CVE Terms of Use, modified 2025-08-19
- GitHub Advisory Database: [GHSA-8gwm-58g9-j8pw](https://github.com/advisories/GHSA-8gwm-58g9-j8pw), CC-BY-4.0, modified 2026-08-07
- NVD: [CVE-2025-54880](https://nvd.nist.gov/vuln/detail/CVE-2025-54880), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-54880 · Whole record: https://cve.day/CVE-2025-54880.json · Rebuilt by cve.day 2026-11-25T22:59:02.788Z
