CVE-2026-23630
JSON

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 packageVersionsReported by
docmost docmost>= 0.3.0, < 0.24.0, from 0.3.0 before 0.24.0CVE List, NVD

All scores

GitHub_M6.3medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N
NVD5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Classification

CWE-79CWE-116

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

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

SourceRecordLicence
CVE ListCVE-2026-23630 changed 2026-01-22CVE Terms of Use
NVDCVE-2026-23630 changed 2026-06-17Public domain