What’s Vulnerable › Vulnerabilities
CVE-2021-21259: Stored XSS in slide mode
- Severity: medium (CVSS 6.1 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.4% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2021-01-22 · updated 2026-06-17
- Weakness: CWE-79
Description
HedgeDoc is open source software which lets you create real-time collaborative markdown notes. In HedgeDoc before version 1.7.2, an attacker can inject arbitrary JavaScript into a HedgeDoc note, which is executed when the note is viewed in slide mode. 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.2. As a workaround, disallow loading JavaScript from 3rd party sites using the `Content-Security-Policy` header. Note that this will break some embedded content.
Affected products
- hedgedoc: before 1.7.2 — fixed in 1.7.2
How to fix
Upgrade to a fixed version: hedgedoc 1.7.2. Check the vendor advisory for mitigations.
References
- https://github.com/hackmdio/codimd/issues/1648
- https://github.com/hedgedoc/hedgedoc/commit/35b0d39a12aa35f27fba8c1f50b1886706e7efef
- https://github.com/hedgedoc/hedgedoc/releases/tag/1.7.2
- https://github.com/hedgedoc/hedgedoc/security/advisories/GHSA-44w9-vm8p-3cxw
- https://github.com/hackmdio/codimd/issues/1648
- https://github.com/hedgedoc/hedgedoc/commit/35b0d39a12aa35f27fba8c1f50b1886706e7efef
- https://github.com/hedgedoc/hedgedoc/releases/tag/1.7.2
- https://github.com/hedgedoc/hedgedoc/security/advisories/GHSA-44w9-vm8p-3cxw
Get alerted when CVE-2021-21259 or the next vulnerability affects your stack