Advisory

GHSA-39h7-pwv7-rc3x

Also known as: None

Summary

Excalidraw vulnerable to XSS via Mermaid sequence diagram labels (KaTeX rendering)

Details

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

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2026-04-24 20:41 UTC
Modified
2026-05-05 16:02 UTC

Affected packages and fixes

@excalidraw/excalidraw

npm · All systems

Affected

  • introduced 0.18.0, fixed 0.18.1 (semver)

Fixed versions

0.18.1

Fix

@excalidraw/mermaid-to-excalidraw

npm · All systems

Affected

  • introduced 0.3.0, fixed 1.1.3 (semver)

Fixed versions

1.1.3

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences