Skip to content

XSS vector in slide mode speaker-view

High
davidmehren published GHSA-j748-779h-9697 Aug 29, 2021

Package

HedgeDoc

Affected versions

<1.9.0

Patched versions

1.9.0

Description

Impact

An unauthenticated attacker can inject arbitrary JavaScript into the speaker-notes of the slide-mode feature by embedding an iframe hosting the malicious code into the slides or by embedding the HedgeDoc instance into another page.

Patches

This problem was fixed by

  • removing the unsafe-inline content security policy, which disallows injecting arbitrary script tags (#1369)
  • removing Google Analytics from the content security policy, as it was a common way to circumvent the CSP (#1375)
  • adding a config option which forbids other pages to embed a HedgeDoc instance (#1513)

Workarounds

None.
The main fix is the removal of the unsafe-inline CSP, which mandated many changes to the frontend code and build infrastructure. These can not be easily applied to older HedgeDoc instances.

For more information

If you have any questions or comments about this advisory:

Severity

High
8.1
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N

CVE ID

CVE-2021-39175

Credits