CVE-2020-26287 json
Stored XSS in mermaid diagrams
published 2020-12-28 5 y ago modified 2026-06-17 4 mo ago also EUVD-2020-18855
- cvss
- 8.7
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.5%
- EPSS 1.5% chance of exploitation in 30 days, percentile 73%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- hedgedoc hedgedoc 1.7.1
Exploit prediction
1.46% chance of exploitation in the next 30 days, higher than 73% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/Alemmi/ctf-writeups/blob/main/hxpctf-2020/hackme/solution.md referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.7 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N |
| NVD | 3.1 | 8.7 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N |
| NVD | 2.0 | 4.3 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
Affected products
- hedgedoc hedgedoc
Classification
- Weakness
-
- CWE-79 Improper Neutralization of Input During Web Page Generation
References
-
github.com
/hedgedoc/hedgedoc/commit/58276ebbf4504a682454a3686dcaff88bc1069d4
patch, third-party-advisory
-
github.com
/Alemmi/ctf-writeups/blob/main/hxpctf-2020/hackme/solution.md
exploit, third-party-advisory
-
github.com
/hedgedoc/hedgedoc/releases/tag/1.7.1
third-party-advisory
-
github.com
/hedgedoc/hedgedoc/security/advisories/GHSA-g6w6-7xf9-m95p
third-party-advisory
-
github.com
/hackmdio/codimd/issues/1630
third-party-advisory
Sources
- CVE List CVE-2020-26287
- NVD CVE-2020-26287
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.