CVE-2020-26287
JSON

8.7high

Stored XSS in mermaid diagrams

Severity
8.7high CVSS:3.1 by GitHub_M
Exploit likelihood
1.46% (higher than 74% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M

Description

HedgeDoc is a collaborative platform for writing and sharing markdown. In HedgeDoc before version 1.7.1 an attacker can inject arbitrary `script` tags in HedgeDoc notes using mermaid diagrams. Our content security policy prevents loading scripts from most locations, but `www.google-analytics.com` is allowed. Using Google Tag Manger it is possible to inject arbitrary JavaScript and execute it on page load. Depending on the configuration of the instance, the attacker may not need authentication to create or edit notes. The problem is patched in HedgeDoc 1.7.1. As a workaround one can disallow `www.google-analytics.com` in the `Content-Security-Policy` header. Note that other ways to leverage the `script` tag injection might exist.

Affected

Product or packageVersionsReported by
hedgedoc hedgedoc< 1.7.1, before 1.7.1CVE List, NVD

All scores

GitHub_M8.7high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
NVD8.7high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
NVD4.3medium CVSS:2.0AV:N/AC:M/Au:N/C:N/I:P/A:N

Classification

What each source says

CVE List

HedgeDoc is a collaborative platform for writing and sharing markdown. In HedgeDoc before version 1.7.1 an attacker can inject arbitrary `script` tags in HedgeDoc notes using mermaid diagrams. Our content security policy prevents loading scripts from most locations, but `www.google-analytics.com` is allowed. Using Google Tag Manger it is possible to inject arbitrary JavaScript and execute it on page load. Depending on the configuration of the instance, the attacker may not need authentication to create or edit notes. The problem is patched in HedgeDoc 1.7.1. As a workaround one can disallow `www.google-analytics.com` in the `Content-Security-Policy` header. Note that other ways to leverage the `script` tag injection might exist.

NVD (es)

HedgeDoc es una plataforma colaborativa para escribir y compartir rebajas.&#xa0;En HedgeDoc versiones anteriores a 1.7.1, un atacante puede inyectar etiquetas "script" arbitrarias en las notas de HedgeDoc usando diagramas mermaid.&#xa0;Nuestra política de seguridad de contenido evita una carga de scripts de la mayoría de las ubicaciones, pero se permite "www.google-analytics.com"&#xa0;Usando Google Tag Manager, es posible inyectar JavaScript arbitrario y ejecutarlo al cargar la página.&#xa0;Dependiendo de la configuración de la instancia, es posible que el atacante no necesite autenticación para crear o editar notas.&#xa0;El problema está parcheado en HedgeDoc versión 1.7.1.&#xa0;Como solución alternativa, se puede rechazar "www.google-analytics.com" en el encabezado "Content-Security-Policy".&#xa0;Tome en cuenta que pueden presentar otras formas de aprovechar la inyección de etiquetas "script"

References

Sources

SourceRecordLicence
CVE ListCVE-2020-26287 changed 2024-08-04CVE Terms of Use
NVDCVE-2020-26287 changed 2026-06-17Public domain