CVE-2021-21259 Stored XSS in slide mode

High 7.4 Published Updated

Attackers can inject arbitrary JavaScript into HedgeDoc notes, executing it in slide mode, potentially leading to code execution or account takeover.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2021-21259?

CVE-2021-21259 is a high-severity cross-site scripting vulnerability in hedgedoc, published on 22 Jan 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

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

Weakness: CWE-79

Which versions are affected by CVE-2021-21259?

It affects 1 product.

Products include Hedgedoc Hedgedoc.

How do I fix CVE-2021-21259?

No fix has been published for CVE-2021-21259 yet. Limit exposure of the affected software until one is available.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2021-21259 being exploited?

There is no known exploitation of CVE-2021-21259 in the wild and no public exploit code.

Sources

Also known as GHSA-44w9-vm8p-3cxw.

Is CVE-2021-21259 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free