Skip to content
Heist/ feed
Back to feed
High

xmldom: XML injection through unvalidated DocumentType serialization

Type: advisorySources: OSV

xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) `DOMParser` and `XMLSerializer` module. In @xmldom/xmldom prior to versions 0.9.10 and 0.8.13 and xmldom version 0.6.0 and prior, the package serializes DocumentType node fields (internalSubset, publicId, systemId) verbatim without any escaping or validation. When these fields are set programmatically to attacker-controlled strings, XMLSerializer.serializeToString can produce output where the DOCTYPE declaration is terminated early and arbitrary markup appears outside it. This issue has been patched in versions @xmldom/xmldom versions 0.9.10 and 0.8.13.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-41674
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 05:17 UTC · Revision 1

Source evidence

xmldom: XML injection through unvalidated DocumentType serialization

core-osv · Original source

Published 7 May 2026, 03:47 UTC

xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) `DOMParser` and `XMLSerializer` module. In @xmldom/xmldom prior to versions 0.9.10 and 0.8.13 and xmldom version 0.6.0 and prior, the package serializes DocumentType node fields (internalSubset, publicId, systemId) verbatim without any escaping or validation. When these fields are set programmatically to attacker-controlled strings, XMLSerializer.serializeToString can produce output where the DOCTYPE declaration is terminated early and arbitrary markup appears outside it. This issue has been patched in versions @xmldom/xmldom versions 0.9.10 and 0.8.13.

osv:CVE-2026-41674
Complete source record
{
  "id": "46bba46ad3fac0402f10bf0ad7dbfd1c0b99e924854c74e5e181c875b2730874",
  "url": "https://osv.dev/vulnerability/CVE-2026-41674",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "xmldom: XML injection through unvalidated DocumentType serialization",
    "summary": "xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) `DOMParser` and `XMLSerializer` module. In @xmldom/xmldom prior to versions 0.9.10 and 0.8.13 and xmldom version 0.6.0 and prior, the package serializes DocumentType node fields (internalSubset, publicId, systemId) verbatim without any escaping or validation. When these fields are set programmatically to attacker-controlled strings, XMLSerializer.serializeToString can produce output where the DOCTYPE declaration is terminated early and arbitrary markup appears outside it. This issue has been patched in versions @xmldom/xmldom versions 0.9.10 and 0.8.13.",
    "evidence": "osv:CVE-2026-41674",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-41674",
      "aliases": [
        "CVE-2026-41674",
        "GHSA-f6ww-3ggp-fr8h"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/xmldom/xmldom",
              "type": "GIT",
              "events": [
                {
                  "introduced": "c80a161172cc4d8733583bf0cf59abfa589f6d9e"
                },
                {
                  "fixed": "372008f9ae0e20fd69f761c7b79e202598267314"
                },
                {
                  "fixed": "e5c14802592685bb872c042c54c3f73758875c85"
                },
                {
                  "fixed": "bf396a575c4dd32ce4bd925b849dcb7e778d957c"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "xmldom <= 0.6.0"
                      },
                      {
                        "last_affected": "xmldom <= 0.6.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandaloneSingleVersion"
                  },
                  {
                    "range": [
                      {
                        "introduced": "@xmldom/xmldom < 0.8.13"
                      },
                      {
                        "last_affected": "@xmldom/xmldom < 0.8.13"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandaloneSingleVersion"
                  },
                  {
                    "range": [
                      {
                        "fixed": "372008f9ae0e20fd69f761c7b79e202598267314"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "e5c14802592685bb872c042c54c3f73758875c85"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "0.8.13"
                  },
                  {
                    "range": [
                      {
                        "fixed": "bf396a575c4dd32ce4bd925b849dcb7e778d957c"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "0.9.10"
                  }
                ]
              }
            }
          ],
          "versions": [
            "@xmldom/xmldom < 0.8.13",
            "xmldom <= 0.6.0",
            "0.9.9",
            "0.8.12",
            "0.8.11",
            "0.8.10",
            "0.9.8",
            "0.9.7",
            "0.9.6",
            "0.9.5",
            "0.9.4",
            "0.9.3",
            "0.9.2",
            "0.9.1",
            "0.9.0",
            "0.9.0-beta.11",
            "0.9.0-beta.10",
            "0.8.9",
            "0.9.0-beta.9",
            "0.8.8",
            "0.9.0-beta.8",
            "0.9.0-beta.7",
            "0.8.7",
            "0.8.6",
            "0.9.0-beta.6",
            "0.8.5",
            "0.8.4",
            "0.9.0-beta.5",
            "0.9.0-beta.4",
            "0.8.3",
            "0.9.0-beta.3",
            "0.9.0-beta.2",
            "0.9.0-beta.1",
            "0.8.2",
            "0.8.1",
            "0.8.0",
            "0.7.3",
            "0.7.2",
            "0.7.1",
            "0.7.0+scoped",
            "v0.7.0",
            "0.7.0+unscoped",
            "0.7.0",
            "0.6.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-41674.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:33.366665024Z",
      "provider": "osv",
      "references": [
        "https://github.com/xmldom/xmldom/releases/tag/0.8.13",
        "https://github.com/xmldom/xmldom/releases/tag/0.9.10",
        "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-41674.json",
        "https://access.redhat.com/errata/RHSA-2026:20034",
        "https://access.redhat.com/errata/RHSA-2026:21338",
        "https://access.redhat.com/errata/RHSA-2026:21703",
        "https://access.redhat.com/errata/RHSA-2026:26234",
        "https://access.redhat.com/security/cve/CVE-2026-41674",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/41xxx/CVE-2026-41674.json",
        "https://github.com/xmldom/xmldom/security/advisories/GHSA-f6ww-3ggp-fr8h",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-41674",
        "https://bugzilla.redhat.com/show_bug.cgi?id=2467620",
        "https://github.com/xmldom/xmldom/commit/372008f9ae0e20fd69f761c7b79e202598267314"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-91"
        ],
        "cna_assigner": "GitHub_M",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "@xmldom/xmldom >= 0.9.0, < 0.9.10"
                  },
                  {
                    "last_affected": "@xmldom/xmldom >= 0.9.0, < 0.9.10"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandaloneSingleVersion"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/41xxx/CVE-2026-41674.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-41674",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 500469,
  "published_at": "2026-05-07T03:47:51.14+00:00"
}