{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "last_affected": "3.3.3"
              },
              {
                "fixed": "3.3.3"
              }
            ],
            "source": [
              "AFFECTED_FIELD",
              "DESCRIPTION"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "8bcbf73ae7eb56e7b4f1300b66cf543342c7ee27"
            }
          ],
          "repo": "https://github.com/cure53/dompurify",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-4w3q-35jp-p934"
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-754"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/65xxx/CVE-2026-65904.json"
  },
  "details": "DOMPurify through 3.3.3 fails to sanitize DOM elements passed via IN_PLACE mode when the element originates from a different window/realm (e.g., an iframe's contentDocument). A cross-realm instanceof check in the private _isNode() function returns false for foreign-realm nodes, causing DOMPurify to stringify the element (yielding '[object HTMLDivElement]'), silently reset IN_PLACE to false, and return the unsanitized element unchanged with any XSS payloads intact.",
  "id": "CVE-2026-65904",
  "modified": "2026-07-25T03:56:17.377317661Z",
  "published": "2026-07-23T13:16:22.069Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/65xxx/CVE-2026-65904.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/cure53/DOMPurify/security/advisories/GHSA-4w3q-35jp-p934"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-65904"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/dompurify-before-cross-site-scripting-via-in-place-mode"
    }
  ],
  "schema_version": "1.8.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "DOMPurify through 3.3.3 Cross-Site Scripting via IN_PLACE mode"
}