{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "0"
                  },
                  {
                    "fixed": "9.2.1039"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              },
              {
                "range": [
                  {
                    "introduced": "10.0.0-beta"
                  },
                  {
                    "fixed": "10.0.1037-beta"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              },
              {
                "range": [
                  {
                    "fixed": "96afbc818e64de7571ea17954a05d523e819c56f"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "range": [
                  {
                    "fixed": "ab626e7a4f2893f7e9ec0a72779ae19c5ec439a7"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "original_tag": "v9.2.1039",
                "range": [
                  {
                    "fixed": "0417018d81765e3e15126a65f5a49d71e55f0920"
                  }
                ],
                "source": "REFERENCES_TAG"
              },
              {
                "original_tag": "v10.0.1037-beta",
                "range": [
                  {
                    "fixed": "a71cbe31e9203b97a2a5204e5f017e0ad11c1c62"
                  }
                ],
                "source": "REFERENCES_TAG"
              }
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0417018d81765e3e15126a65f5a49d71e55f0920"
            },
            {
              "fixed": "a71cbe31e9203b97a2a5204e5f017e0ad11c1c62"
            },
            {
              "fixed": "96afbc818e64de7571ea17954a05d523e819c56f"
            },
            {
              "fixed": "ab626e7a4f2893f7e9ec0a72779ae19c5ec439a7"
            }
          ],
          "repo": "https://github.com/mganss/htmlsanitizer",
          "type": "GIT"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-79"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/116xxx/CVE-2026-116538.json"
  },
  "details": "HtmlSanitizer before 9.2.1039 and 10.0 prereleases before 10.0.1037-beta contains a cross-site scripting vulnerability because SanitizeDom(string) never sanitizes attributes on the html and body wrapper elements. Attackers can supply input with a second body or html tag carrying event handlers like onload, executing script when applications render serialized document or body outer HTML.",
  "id": "CVE-2026-116538",
  "modified": "2026-11-01T02:30:34.617528331Z",
  "published": "2026-10-26T14:59:38.815Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://www.nuget.org/packages/HtmlSanitizer"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/116xxx/CVE-2026-116538.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/mganss/HtmlSanitizer/releases/tag/v10.0.1037-beta"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/mganss/HtmlSanitizer/releases/tag/v9.2.1039"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-116538"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/htmlsanitizer-before-9.2.1039-xss-via-sanitizedom-body-and-html-attributes"
    },
    {
      "type": "FIX",
      "url": "https://github.com/mganss/HtmlSanitizer/commit/96afbc818e64de7571ea17954a05d523e819c56f"
    },
    {
      "type": "FIX",
      "url": "https://github.com/mganss/HtmlSanitizer/commit/ab626e7a4f2893f7e9ec0a72779ae19c5ec439a7"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/mganss/HtmlSanitizer"
    },
    {
      "type": "ARTICLE",
      "url": "https://github.com/mganss/HtmlSanitizer/blob/v9.2.995/src/HtmlSanitizer/HtmlSanitizer.cs#L456-L465"
    },
    {
      "type": "ARTICLE",
      "url": "https://github.com/mganss/HtmlSanitizer/blob/v9.2.995/src/HtmlSanitizer/HtmlSanitizer.cs#L555-L583"
    },
    {
      "type": "ARTICLE",
      "url": "https://joshua.hu/htmlsanitizer-sanitizedom-body-html-attribute-bypass"
    }
  ],
  "schema_version": "1.9.2",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "HtmlSanitizer before 9.2.1039 XSS via SanitizeDom Body and HTML Attributes"
}