Excalidraw vulnerable to XSS via Mermaid sequence diagram labels (KaTeX rendering)
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from GitHub. Impact type from CWE-79.
Summary
### 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
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | @excalidraw/excalidraw (npm) | 0.18.0 to before 0.18.1 | 0.18.1 | Patch available | GHSA-39h7-pwv7-rc3x |
| — | @excalidraw/mermaid-to-excalidraw (npm) | 0.3.0 to before 1.1.3 | 1.1.3 | Patch available | GHSA-39h7-pwv7-rc3x |
- @excalidraw/excalidraw (npm) Vendor— Affected 0.18.0 to before 0.18.1 Fixed in 0.18.1 Patch available GHSA-39h7-pwv7-rc3x
- @excalidraw/mermaid-to-excalidraw (npm) Vendor— Affected 0.3.0 to before 1.1.3 Fixed in 1.1.3 Patch available GHSA-39h7-pwv7-rc3x
Remediation
- Fix · GHSA-39h7-pwv7-rc3x @excalidraw/excalidraw (npm) Fixed in 0.18.1 Advisory →
- Fix · GHSA-39h7-pwv7-rc3x @excalidraw/mermaid-to-excalidraw (npm) Fixed in 1.1.3 Advisory →
Timeline
- 2026-10-03 Threatist record created from GHSA-39h7-pwv7-rc3x
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences