6.3medium
Docmost is vulnerable to stored Cross-Site Scripting (XSS) through Mermaid rendering
- Severity
- 6.3medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.45% (higher than 31% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
Description
Docmost is open-source collaborative wiki and documentation software. In versions 0.3.0 through 0.23.2, Mermaid code block rendering is vulnerable to stored Cross-Site Scripting (XSS). The frontend can render attacker-controlled Mermaid diagrams using mermaid.render(), then inject the returned SVG/HTML into the DOM via dangerouslySetInnerHTML without sanitization. Mermaid per-diagram %%{init}%% directives allow overriding securityLevel and enabling htmlLabels, permitting arbitrary HTML/JS execution for any viewer. This issue has been fixed in version 0.24.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| docmost docmost | >= 0.3.0, < 0.24.0, from 0.3.0 before 0.24.0 | CVE List, NVD |
All scores
| GitHub_M | 6.3medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N |
| NVD | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
Classification
What each source says
CVE List
Docmost is open-source collaborative wiki and documentation software. In versions 0.3.0 through 0.23.2, Mermaid code block rendering is vulnerable to stored Cross-Site Scripting (XSS). The frontend can render attacker-controlled Mermaid diagrams using mermaid.render(), then inject the returned SVG/HTML into the DOM via dangerouslySetInnerHTML without sanitization. Mermaid per-diagram %%{init}%% directives allow overriding securityLevel and enabling htmlLabels, permitting arbitrary HTML/JS execution for any viewer. This issue has been fixed in version 0.24.0.
NVD (es)
Docmost es un software de wiki colaborativo y documentación de código abierto. En las versiones 0.3.0 a la 0.23.2, la renderización de bloques de código Mermaid es vulnerable a cross-site scripting (XSS) almacenado. El frontend puede renderizar diagramas Mermaid controlados por el atacante usando mermaid.render(), luego inyectar el SVG/HTML devuelto en el DOM a través de dangerouslySetInnerHTML sin sanitización. Las directivas %%{init}%% de Mermaid por diagrama permiten anular securityLevel y habilitar htmlLabels, permitiendo la ejecución arbitraria de HTML/JS para cualquier visor. Este problema ha sido solucionado en la versión 0.24.0.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-23630 changed 2026-01-22 | CVE Terms of Use |
| NVD | CVE-2026-23630 changed 2026-06-17 | Public domain |