# CVE-2021-21259: Stored XSS in slide mode

- Severity: High 7.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.37%, higher than 72% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-01-22T17:10:19.000Z
- Modified: 2026-06-17T03:35:08.637Z
- Weaknesses: CWE-79
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- hedgedoc hedgedoc: < 1.7.2; before 1.7.2

## Every score

- GitHub_M: CVSS:3.1 7.4 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:2.0 4.3 Medium `AV:N/AC:M/Au:N/C:N/I:P/A:N`

## References

- <https://github.com/hackmdio/codimd/issues/1648> (exploit, patch, third-party-advisory)
- <https://github.com/hedgedoc/hedgedoc/security/advisories/GHSA-44w9-vm8p-3cxw> (third-party-advisory)
- <https://github.com/hedgedoc/hedgedoc/releases/tag/1.7.2> (release-notes, third-party-advisory)
- <https://github.com/hedgedoc/hedgedoc/commit/35b0d39a12aa35f27fba8c1f50b1886706e7efef> (patch, third-party-advisory)

## Sources

- CVE List: [CVE-2021-21259](https://www.cve.org/CVERecord?id=CVE-2021-21259), CVE Terms of Use, modified 2024-08-03
- NVD: [CVE-2021-21259](https://nvd.nist.gov/vuln/detail/CVE-2021-21259), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-21259 · Whole record: https://cve.day/CVE-2021-21259.json · Rebuilt by cve.day 2026-11-25T22:57:59.717Z
