CVE-2021-29503 log

Source
Severity High
Remote Yes
Type Cross-site scripting
Description
HedgeDoc before version 1.8.2  is vulnerable to a cross-site scripting (XSS) attack using the YAML-metadata of a note. An attacker with write access to a note can embed HTML tags in the Open Graph metadata section of the note, resulting in the frontend rendering the script tag as part of the <head> section.

This vulnerability affects all installations. Unless your instance prevents guests from editing notes, this vulnerability allows unauthenticated attackers to inject JavaScript into notes that allow guest edits. If your instance prevents guests from editing notes, this vulnerability allows authenticated attackers to inject JavaScript into any note pages they have write-access to.
Group Package Affected Fixed Severity Status Ticket
AVG-1946 hedgedoc 1.8.1-1 1.8.2-1 High Fixed
Date Advisory Group Package Severity Type
19 May 2021 ASA-202105-9 AVG-1946 hedgedoc High cross-site scripting
References
https://github.com/hedgedoc/hedgedoc/security/advisories/GHSA-gjg7-4j2h-94fq
https://github.com/hedgedoc/hedgedoc/commit/4a0216096a6aa1ebba9d8b0ada067c73ffa1513f
Notes
Workaround
==========

In order to prevent unauthenticated attacks in can be useful to disable guest edits until the next update. To do this set the following to configuration options:

{
    # other configs
    # …
     "allowAnonymous": false,
     "allowAnonymousEdits": false,

}

Or set the environment variables CMD_ALLOW_ANONYMOUS=false and CMD_ALLOW_ANONYMOUS_EDITS=false.