Skip to content

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

Moderate severity GitHub Reviewed Published Apr 21, 2026 in excalidraw/excalidraw • Updated Apr 24, 2026

Package

npm @excalidraw/excalidraw (npm)

Affected versions

= 0.18.0

Patched versions

0.18.1
npm @excalidraw/mermaid-to-excalidraw (npm)
>= 0.3.0, < 1.1.3
1.1.3

Description

Impact

@excalidraw/excalidraw@0.18.0 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/excalidraw@0.18.1 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/excalidraw@0.18.1 is patched.
  • Unstable @excalidraw/excalidraw@next has resolved to patched builds since @excalidraw/excalidraw@0.18.0-f29edf on 2025-08-21.
  • Direct consumers of @excalidraw/mermaid-to-excalidraw should use 1.1.3 or later.

Workarounds

None.

Resources

References

@dwelle dwelle published to excalidraw/excalidraw Apr 21, 2026
Published to the GitHub Advisory Database Apr 24, 2026
Reviewed Apr 24, 2026
Last updated Apr 24, 2026

Severity

Moderate

EPSS score

Weaknesses

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. Learn more on MITRE.

Dependency on Vulnerable Third-Party Component

The product has a dependency on a third-party component that contains one or more known vulnerabilities. Learn more on MITRE.

CVE ID

No known CVE

GHSA ID

GHSA-39h7-pwv7-rc3x

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.