Medium

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

  • Disclosed: 24.04.2026
  • Updated: 11.10.2026 10:22

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

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package @excalidraw/excalidraw >= 0.18.0, < 0.18.1 0.18.1
npm package @excalidraw/mermaid-to-excalidraw >= 0.3.0, < 1.1.3 1.1.3

References

CVSS score -
Weakness (CWE)
CWE-1395, CWE-79
Platform
npm
Package
@excalidraw/excalidraw, @excalidraw/mermaid-to-excalidraw
Disclosed
24.04.2026
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-39h7-pwv7-rc3x - CC BY 4.0

Vulnerability history: @excalidraw/excalidraw

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
3
First → latest
08.2023 04.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Medium 3

Disclosures per year

  1. 2023: 1
  2. 2024: 1
  3. 2025: 0
  4. 2026: 1
  1. Excalidraw vulnerable to XSS via Mermaid sequence diagram labels (KaTeX rendering) this entry
    Medium ghsa-39h7-pwv7-rc3x >= 0.18.0, < 0.18.1 0.18.1
  2. Medium · 6.1 CVE-2024-32472 >= 0.16.0, < 0.16.4, >= 0.17.0, < 0.17.6 0.16.4, 0.17.6
  3. Medium · 6.1 CVE-2023-26140 < 0.15.3 0.15.3

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.