Skip to content
Heist/ feed
Back to feed
Medium

HedgeDoc allows XSS possibility through malicious SVG uploads

Type: advisorySources: OSV

HedgeDoc is an open source, real-time, collaborative, markdown notes application. Prior to 1.10.3, a malicious SVG file uploaded to HedgeDoc results in the possibility of XSS when opened in a new tab instead of the editor itself. The XSS is possible by exploiting the JSONP capabilities of GitHub Gist embeddings. Only instances with the local filesystem upload backend or special configurations, where the uploads are served from the same domain as HedgeDoc, are vulnerable. This vulnerability is fixed in 1.10.3. When upgrading to HedgeDoc 1.10.3 is not possible, instance owners could add the following headers for all routes under /uploads as a first-countermeasure: Content-Disposition: attachment and Content-Security-Policy: default-src 'none'. Additionally, the external URLs in the script-src attribute of the Content-Security-Policy header should be removed.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-32391
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 21:54 UTC · Revision 1

Source evidence

HedgeDoc allows XSS possibility through malicious SVG uploads

core-osv · Original source

Published 10 Apr 2025, 13:11 UTC

HedgeDoc is an open source, real-time, collaborative, markdown notes application. Prior to 1.10.3, a malicious SVG file uploaded to HedgeDoc results in the possibility of XSS when opened in a new tab instead of the editor itself. The XSS is possible by exploiting the JSONP capabilities of GitHub Gist embeddings. Only instances with the local filesystem upload backend or special configurations, where the uploads are served from the same domain as HedgeDoc, are vulnerable. This vulnerability is fixed in 1.10.3. When upgrading to HedgeDoc 1.10.3 is not possible, instance owners could add the following headers for all routes under /uploads as a first-countermeasure: Content-Disposition: attachment and Content-Security-Policy: default-src 'none'. Additionally, the external URLs in the script-src attribute of the Content-Security-Policy header should be removed.

osv:CVE-2025-32391
Complete source record
{
  "id": "c48cb0144cc8f72a2f45ae66a1be5d8e90347a228fb5e1a13eb46e43f63630dd",
  "url": "https://osv.dev/vulnerability/CVE-2025-32391",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "HedgeDoc allows XSS possibility through malicious SVG uploads",
    "summary": "HedgeDoc is an open source, real-time, collaborative, markdown notes application. Prior to 1.10.3, a malicious SVG file uploaded to HedgeDoc results in the possibility of XSS when opened in a new tab instead of the editor itself. The XSS is possible by exploiting the JSONP capabilities of GitHub Gist embeddings. Only instances with the local filesystem upload backend or special configurations, where the uploads are served from the same domain as HedgeDoc, are vulnerable. This vulnerability is fixed in 1.10.3. When upgrading to HedgeDoc 1.10.3 is not possible, instance owners could add the following headers for all routes under /uploads as a first-countermeasure: Content-Disposition: attachment and Content-Security-Policy: default-src 'none'. Additionally, the external URLs in the script-src attribute of the Content-Security-Policy header should be removed.",
    "evidence": "osv:CVE-2025-32391",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2025-32391",
      "aliases": [
        "CVE-2025-32391",
        "GHSA-3983-rrqh-mvx5"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/hedgedoc/hedgedoc",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "d8b94026ee927213eda14973dd4386ea9e6389c0"
                },
                {
                  "fixed": "0636b5c20b7097afccfa6641830352ad068ef964"
                },
                {
                  "fixed": "3f520ea59abf912c66d7443cb99f29a567c47748"
                },
                {
                  "fixed": "d2585fbd3b398b3359f6f88aa1fda8f4ecf2f78d"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:hedgedoc:hedgedoc:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.10.3"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "0636b5c20b7097afccfa6641830352ad068ef964"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "3f520ea59abf912c66d7443cb99f29a567c47748"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "d2585fbd3b398b3359f6f88aa1fda8f4ecf2f78d"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "1.10.2",
            "1.10.1",
            "1.10.0",
            "1.9.9",
            "1.9.8",
            "1.9.7",
            "1.9.6",
            "1.9.5",
            "1.9.4",
            "1.9.3",
            "1.9.2",
            "1.9.1",
            "1.9.0",
            "1.9.0-rc1",
            "1.8.2",
            "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-2025-32391.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:24.134952279Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/32xxx/CVE-2025-32391.json",
        "https://github.com/hedgedoc/hedgedoc/security/advisories/GHSA-3983-rrqh-mvx5",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-32391",
        "https://github.com/hedgedoc/hedgedoc/commit/0636b5c20b7097afccfa6641830352ad068ef964",
        "https://github.com/hedgedoc/hedgedoc/commit/3f520ea59abf912c66d7443cb99f29a567c47748",
        "https://github.com/hedgedoc/hedgedoc/commit/d2585fbd3b398b3359f6f88aa1fda8f4ecf2f78d"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-79"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/32xxx/CVE-2025-32391.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-32391",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 490395,
  "published_at": "2025-04-10T13:11:48.634+00:00"
}