NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · npm

GHSA-39h7-pwv7-rc3x: Excalidraw vulnerable to XSS via Mermaid sequence diagram labels (KaTeX rendering)

medium

Impact @excalidraw/[email protected] depends on a Mermaid conversion package version that resolves to a Mermaid release affected by CVE-2025-54881 / GHSA-7rqq-prvp-x9jh. User-supplied Mermaid sequence diagram labels could trigger XSS through Mermaid’s KaTeX label rendering path.

Published Apr 24, 2026

Affected packages

@excalidraw/excalidraw

Ecosystem
npm
Affected
= 0.18.0
Fixed in
0.18.1
Check
npm ls @excalidraw/excalidraw

@excalidraw/mermaid-to-excalidraw

Ecosystem
npm
Affected
>= 0.3.0, < 1.1.3
Fixed in
1.1.3
Check
npm ls @excalidraw/mermaid-to-excalidraw

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

Impact

@excalidraw/[email protected] depends on a Mermaid conversion package version that resolves to a Mermaid release affected by CVE-2025-54881 / GHSA-7rqq-prvp-x9jh. User-supplied Mermaid sequence diagram labels could trigger XSS through Mermaid’s KaTeX label rendering path.

This is patched in @excalidraw/[email protected] by updating @excalidraw/mermaid-to-excalidraw to 2.2.2, which uses a patched Mermaid 11 release.

Moderate severity as this XSS requires manual user action - pasting unsafe Mermaid diagram into the Excalidraw editor. No semi-automated attack vector exists by default (such as accessing a link).

Patches

  • Stable @excalidraw/[email protected] is patched.
  • Unstable @excalidraw/excalidraw@next has resolved to patched builds since @excalidraw/[email protected] on 2025-08-21.
  • Direct consumers of @excalidraw/mermaid-to-excalidraw should use 1.1.3 or later.

Workarounds

None.

Resources

  • Upstream Mermaid advisory: https://github.com/mermaid-js/mermaid/security/advisories/GHSA-7rqq-prvp-x9jh
  • CVE-2025-54881

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More npm vulnerabilities

All npm entries