# CVE-2021-35513: Cross-site Scripting in Mermaid

- Severity: Medium 6.1 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A: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): 1.02%, higher than 62% of CVEs (2026-11-30)
- Published: 2021-06-27T11:03:30.000Z
- Modified: 2026-06-17T03:57:36.537Z
- Also known as: GHSA-4f6x-49g2-99fm
- Weaknesses: CWE-79
- Assigned by: mitre

## Description

Mermaid before 8.11.0 allows XSS when the antiscript feature is used.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- mermaid (npm): before 8.11.0
- mermaid_project mermaid: before 8.11.0

## Every score

- GitHub: 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`
- 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`
- NVD: CVSS:2.0 4.3 Medium `AV:N/AC:M/Au:N/C:N/I:P/A:N`

## References

- <https://github.com/mermaid-js/mermaid/issues/2122> (third-party-advisory, web)
- <https://github.com/mermaid-js/mermaid/pull/2123> (patch, third-party-advisory, web)
- <https://github.com/mermaid-js/mermaid/releases/tag/8.11.0-rc2> (release-notes, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-35513> (advisory)
- <https://github.com/mermaid-js/mermaid/pull/2123/commits/3d22fa5d2435de5acc18de6f88474a6e8675a60e> (web)

## Sources

- CVE List: [CVE-2021-35513](https://www.cve.org/CVERecord?id=CVE-2021-35513), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-4f6x-49g2-99fm](https://github.com/advisories/GHSA-4f6x-49g2-99fm), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2021-35513](https://nvd.nist.gov/vuln/detail/CVE-2021-35513), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-35513 · Whole record: https://cve.day/CVE-2021-35513.json · Rebuilt by cve.day 2026-11-25T22:58:02.336Z
