Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-29503

HedgeDoc is a platform to write and share markdown. HedgeDoc before version 1.8.2 is vulnerable to a cross-site scripting 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 `` section. 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. This vulnerability is patched in version 1.8.2. As a workaround, one can disable guest edits until the next update.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-29503
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 11:16 UTC · Revision 1

Source evidence

CVE-2021-29503

core-osv · Original source

Published 19 May 2021, 20:15 UTC

HedgeDoc is a platform to write and share markdown. HedgeDoc before version 1.8.2 is vulnerable to a cross-site scripting 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 `` section. 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. This vulnerability is patched in version 1.8.2. As a workaround, one can disable guest edits until the next update.

osv:CVE-2021-29503
Complete source record
{
  "id": "5c20b0b888b2d8fa87cff44ccabb9d4df428835d9996083a2acd02dbc41bef98",
  "url": "https://osv.dev/vulnerability/CVE-2021-29503",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-29503",
    "summary": "HedgeDoc is a platform to write and share markdown. HedgeDoc before version 1.8.2 is vulnerable to a cross-site scripting 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 `` section. 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. This vulnerability is patched in version 1.8.2. As a workaround, one can disable guest edits until the next update.",
    "evidence": "osv:CVE-2021-29503",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2021-29503",
      "aliases": [
        "CVE-2021-29503",
        "GHSA-gjg7-4j2h-94fq"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/hedgedoc/hedgedoc",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "8b374d8c1972db2b09126e8f9cc10384552abf29"
                },
                {
                  "fixed": "01dad5821ee28377ebe640c6c72c3e0bb0d51ea7"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:hedgedoc:hedgedoc:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.8.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "01dad5821ee28377ebe640c6c72c3e0bb0d51ea7"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "8b374d8c1972db2b09126e8f9cc10384552abf29"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "1.8.2"
                  }
                ]
              }
            }
          ],
          "versions": [
            "1.8.1",
            "1.8.0",
            "1.8.0-rc1",
            "1.7.2",
            "1.7.1",
            "1.7.0",
            "1.7.0-rc2",
            "1.7.0-rc1",
            "1.6.0",
            "1.5.0",
            "1.4.0",
            "1.3.2",
            "1.3.1",
            "1.3.0",
            "1.2.1",
            "1.2.0",
            "1.1.1-ce",
            "1.1.0-ce",
            "1.0.1-ce",
            "1.0.0-ce",
            "0.5.0",
            "0.4.6",
            "0.4.5",
            "0.4.4",
            "0.4.3",
            "0.4.2",
            "0.4.1",
            "0.4.0",
            "v0.3.4",
            "v0.3.3"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-29503.json"
          }
        }
      ],
      "modified": "2026-10-20T10:53:42.987247650Z",
      "provider": "osv",
      "references": [
        "https://github.com/hedgedoc/hedgedoc/releases/tag/1.8.2",
        "https://github.com/hedgedoc/hedgedoc/commit/01dad5821ee28377ebe640c6c72c3e0bb0d51ea7",
        "https://github.com/hedgedoc/hedgedoc/security/advisories/GHSA-gjg7-4j2h-94fq"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-29503",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 384533,
  "published_at": "2021-05-19T20:15:07.44+00:00"
}