CVE-2020-26287: Stored XSS in mermaid diagrams

Published Dec 28, 2020
·
Updated

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 Software

1 affected component
HedgeDoc HedgeDoc<1.7.1

Event History

Dec 28, 2020
CVE Published
via MITRE·11:30 PM
Data Sourced
via MITRE·11:30 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What is the severity of CVE-2020-26287?

CVE-2020-26287 has a medium severity rating as it allows for script injection into HedgeDoc notes.

2

How do I fix CVE-2020-26287?

To fix CVE-2020-26287, upgrade HedgeDoc to version 1.7.1 or later.

3

What types of attacks are possible with CVE-2020-26287?

CVE-2020-26287 allows attackers to inject and execute arbitrary scripts in HedgeDoc notes.

4

Which versions of HedgeDoc are affected by CVE-2020-26287?

CVE-2020-26287 affects all HedgeDoc versions prior to 1.7.1.

5

Is there a workaround for CVE-2020-26287 if I cannot update?

There are no official workarounds for CVE-2020-26287; updating to a secure version is recommended.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203