Public mode

No access to your tenant or devices. Every item links to its source. What this means

Sources need attention Customize Public modeDiscuss ChangeIntel on Discord

xmldom: DocType `name` Injection Bypasses requireWellFormed

Exploitation and risk

Source status

CISA KEV lists vulnerabilities known to be exploited. FIRST EPSS estimates the likelihood of exploitation in the next 30 days. An unavailable score does not mean zero risk.

Which CVEs have scores here?

This view includes predictions for CVE identifiers explicitly listed in public NuGet advisories. Microsoft release pages have their own prediction coverage. Check source status for the scope and latest checks.

No exploitation or prediction data is available here for these CVEs. This does not mean they are safe or unlikely to be exploited.

cve-program · CVE-2026-83608

Published

xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. Prior to @xmldom/xmldom versions 0.8.15 and 0.9.12, and in xmldom version 0.6.0 and earlier, the DOCUMENT_TYPE_NODE branch in lib/dom.js validates publicId, systemId, and internalSubset under requireWellFormed: true but emits DocumentType.name verbatim. A name containing > or whitespace can terminate the <!DOCTYPE ...> declaration and inject sibling markup; the value can be supplied through createDocumentType() on the 0.8.x and unscoped lines or through a direct DocumentType.name property write on every affected line. The default path and legacy creation-time behavior remain permissive, while the vulnerable strict path fails to enforce an XML Name. This issue is fixed in @xmldom/xmldom versions 0.8.15 and 0.9.12; no fixed version is available for xmldom.

Source published
1 Sep 2026 14:27:26 UTC
Source modified
4 Sep 2026 01:56:15 UTC
Saved here
23 Oct 2026 15:48:27 UTC
Source terms
CVE Program Terms of Use

Original source record · Cite this exact observation · Complete original publisher JSON

Source: cve-program · CVE Program Terms of Use. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.

CVSS 4.0 · 8.7 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

euvd · EUVD-2026-69219

Published

xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. Prior to @xmldom/xmldom versions 0.8.15 and 0.9.12, and in xmldom version 0.6.0 and earlier, the DOCUMENT_TYPE_NODE branch in lib/dom.js validates publicId, systemId, and internalSubset under requireWellFormed: true but emits DocumentType.name verbatim. A name containing > or whitespace can terminate the <!DOCTYPE ...> declaration and inject sibling markup; the value can be supplied through createDocumentType() on the 0.8.x and unscoped lines or through a direct DocumentType.name property write on every affected line. The default path and legacy creation-time behavior remain permissive, while the vulnerable strict path fails to enforce an XML Name. This issue is fixed in @xmldom/xmldom versions 0.8.15 and 0.9.12; no fixed version is available for xmldom.

Additional publisher context

EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.

Original publisher date fields

datePublished: Sep 1, 2026, 2:27:26 PM

dateUpdated: Sep 4, 2026, 1:56:15 AM

5 related source bulletins · separate from aliases

RHSA-2026:69248: Red Hat Security Advisory: Red Hat Developer Hub 1.9.9 release.

CVE-2026-19534 · CVE-2026-33818 · CVE-2026-54272 · CVE-2026-55553 · CVE-2026-56853 · CVE-2026-56858 · CVE-2026-56859 · CVE-2026-56860 · CVE-2026-56862 · CVE-2026-67214 · CVE-2026-67312 · CVE-2026-67422 · CVE-2026-69152 · CVE-2026-69192 · CVE-2026-73086 · CVE-2026-75899 · CVE-2026-75931 · CVE-2026-75975 · CVE-2026-76172 · CVE-2026-83605 · CVE-2026-83607 · CVE-2026-83608 · CVE-2026-83613 · CVE-2026-83614 · CVE-2026-83615 · CVE-2026-83616 · CVE-2026-83619 · CVE-2026-84292 · CVE-2026-84394 · CVE-2026-84961

msrc_CVE-2026-83608: xmldom: DocType `name` Injection Bypasses requireWellFormed

CVE-2026-83608

WID-SEC-W-2026-3623: IBM DataPower Gateway: Mehrere Schwachstellen

CVE-2023-53781 · CVE-2025-14087 · CVE-2025-14512 · CVE-2025-21858 · CVE-2025-22105 · CVE-2025-37980 · CVE-2025-38015 · CVE-2025-38097 · CVE-2025-38180 · CVE-2025-38400 · CVE-2025-38405 · CVE-2025-38441 · CVE-2025-38470 · CVE-2025-38653 · CVE-2025-39766 · CVE-2025-39797 · CVE-2025-39866 · CVE-2025-40134 · CVE-2025-48431 · CVE-2025-5278 · CVE-2025-68183 · CVE-2025-68211 · CVE-2025-68214 · CVE-2025-68347 · CVE-2025-68366 · CVE-2025-68724 · CVE-2025-71066 · CVE-2025-71089 · CVE-2026-12143 · CVE-2026-13257 · CVE-2026-13258 · CVE-2026-13757 · CVE-2026-14269 · CVE-2026-14273 · CVE-2026-14496 · CVE-2026-14497 · CVE-2026-14502 · CVE-2026-14507 · CVE-2026-14508 · CVE-2026-14509 · CVE-2026-14888 · CVE-2026-14905 · CVE-2026-14988 · CVE-2026-14990 · CVE-2026-14991 · CVE-2026-14992 · CVE-2026-14999 · CVE-2026-15588 · CVE-2026-15762 · CVE-2026-15781 · CVE-2026-15784 · CVE-2026-15819 · CVE-2026-15822 · CVE-2026-15824 · CVE-2026-16111 · CVE-2026-16159 · CVE-2026-16161 · CVE-2026-16163 · CVE-2026-16164 · CVE-2026-16165 · CVE-2026-16167 · CVE-2026-16169 · CVE-2026-16170 · CVE-2026-16176 · CVE-2026-16177 · CVE-2026-16178 · CVE-2026-16179 · CVE-2026-16181 · CVE-2026-16182 · CVE-2026-16340 · CVE-2026-16439 · CVE-2026-16440 · CVE-2026-16441 · CVE-2026-2100 · CVE-2026-22979 · CVE-2026-22984 · CVE-2026-22990 · CVE-2026-23002 · CVE-2026-23060 · CVE-2026-23110 · CVE-2026-23204 · CVE-2026-23209 · CVE-2026-23216 · CVE-2026-23243 · CVE-2026-23270 · CVE-2026-23392 · CVE-2026-23455 · CVE-2026-2391 · CVE-2026-31411 · CVE-2026-31419 · CVE-2026-31488 · CVE-2026-31508 · CVE-2026-31532 · CVE-2026-31581 · CVE-2026-31607 · CVE-2026-31613 · CVE-2026-31669 · CVE-2026-31677 · CVE-2026-31684 · CVE-2026-31685 · CVE-2026-33845 · CVE-2026-33846 · CVE-2026-3832 · CVE-2026-3833 · CVE-2026-4046 · CVE-2026-41254 · CVE-2026-41602 · CVE-2026-41606 · CVE-2026-41607 · CVE-2026-42009 · CVE-2026-42010 · CVE-2026-42011 · CVE-2026-42012 · CVE-2026-42013 · CVE-2026-42014 · CVE-2026-42015 · CVE-2026-43027 · CVE-2026-43037 · CVE-2026-43038 · CVE-2026-43056 · CVE-2026-43074 · CVE-2026-43116 · CVE-2026-43125 · CVE-2026-43163 · CVE-2026-43190 · CVE-2026-43198 · CVE-2026-43260 · CVE-2026-43284 · CVE-2026-43303 · CVE-2026-43329 · CVE-2026-43499 · CVE-2026-43501 · CVE-2026-43868 · CVE-2026-43870 · CVE-2026-4437 · CVE-2026-4438 · CVE-2026-45852 · CVE-2026-46054 · CVE-2026-46086 · CVE-2026-46116 · CVE-2026-46173 · CVE-2026-46181 · CVE-2026-46242 · CVE-2026-46259 · CVE-2026-46300 · CVE-2026-46331 · CVE-2026-46333 · CVE-2026-46917 · CVE-2026-46968 · CVE-2026-47010 · CVE-2026-47021 · CVE-2026-47027 · CVE-2026-47059 · CVE-2026-47063 · CVE-2026-48144 · CVE-2026-48145 · CVE-2026-5260 · CVE-2026-52923 · CVE-2026-52991 · CVE-2026-53006 · CVE-2026-53009 · CVE-2026-53131 · CVE-2026-53189 · CVE-2026-53264 · CVE-2026-53266 · CVE-2026-5419 · CVE-2026-5450 · CVE-2026-55602 · CVE-2026-55603 · CVE-2026-55968 · CVE-2026-55970 · CVE-2026-58010 · CVE-2026-58011 · CVE-2026-58012 · CVE-2026-58013 · CVE-2026-58014 · CVE-2026-58015 · CVE-2026-58016 · CVE-2026-58662 · CVE-2026-59879 · CVE-2026-59880 · CVE-2026-60147 · CVE-2026-60589 · CVE-2026-61308 · CVE-2026-63913 · CVE-2026-63952 · CVE-2026-64017 · CVE-2026-64530 · CVE-2026-64560 · CVE-2026-70906 · CVE-2026-70907 · CVE-2026-74581 · CVE-2026-82417 · CVE-2026-82562 · CVE-2026-83605 · CVE-2026-83607 · CVE-2026-83608 · CVE-2026-83613 · CVE-2026-83614 · CVE-2026-83615 · CVE-2026-83616 · CVE-2026-83619

NCSC-2026-0431: Kwetsbaarheden verholpen in IBM DataPower Gateway en onderliggende componenten

CVE-2023-53781 · CVE-2025-14087 · CVE-2025-14512 · CVE-2025-21858 · CVE-2025-22105 · CVE-2025-37980 · CVE-2025-38015 · CVE-2025-38097 · CVE-2025-38180 · CVE-2025-38400 · CVE-2025-38405 · CVE-2025-38441 · CVE-2025-38470 · CVE-2025-38653 · CVE-2025-39766 · CVE-2025-39797 · CVE-2025-39866 · CVE-2025-40134 · CVE-2025-48431 · CVE-2025-5278 · CVE-2025-68183 · CVE-2025-68211 · CVE-2025-68214 · CVE-2025-68347 · CVE-2025-68366 · CVE-2025-68724 · CVE-2025-71066 · CVE-2025-71089 · CVE-2026-12143 · CVE-2026-13257 · CVE-2026-13258 · CVE-2026-13757 · CVE-2026-14269 · CVE-2026-14273 · CVE-2026-14496 · CVE-2026-14497 · CVE-2026-14502 · CVE-2026-14507 · CVE-2026-14508 · CVE-2026-14509 · CVE-2026-14888 · CVE-2026-14905 · CVE-2026-14988 · CVE-2026-14990 · CVE-2026-14991 · CVE-2026-14992 · CVE-2026-14999 · CVE-2026-15588 · CVE-2026-15762 · CVE-2026-15781 · CVE-2026-15784 · CVE-2026-15819 · CVE-2026-15822 · CVE-2026-15824 · CVE-2026-16111 · CVE-2026-16159 · CVE-2026-16161 · CVE-2026-16163 · CVE-2026-16164 · CVE-2026-16165 · CVE-2026-16167 · CVE-2026-16169 · CVE-2026-16170 · CVE-2026-16176 · CVE-2026-16177 · CVE-2026-16178 · CVE-2026-16179 · CVE-2026-16181 · CVE-2026-16182 · CVE-2026-16340 · CVE-2026-16439 · CVE-2026-16440 · CVE-2026-16441 · CVE-2026-2100 · CVE-2026-22979 · CVE-2026-22984 · CVE-2026-22990 · CVE-2026-23002 · CVE-2026-23060 · CVE-2026-23110 · CVE-2026-23204 · CVE-2026-23209 · CVE-2026-23216 · CVE-2026-23243 · CVE-2026-23270 · CVE-2026-23392 · CVE-2026-23455 · CVE-2026-2391 · CVE-2026-31411 · CVE-2026-31419 · CVE-2026-31488 · CVE-2026-31508 · CVE-2026-31532 · CVE-2026-31581 · CVE-2026-31607 · CVE-2026-31613 · CVE-2026-31669 · CVE-2026-31677 · CVE-2026-31684 · CVE-2026-31685 · CVE-2026-33845 · CVE-2026-33846 · CVE-2026-3832 · CVE-2026-3833 · CVE-2026-4046 · CVE-2026-41254 · CVE-2026-41602 · CVE-2026-41606 · CVE-2026-41607 · CVE-2026-42009 · CVE-2026-42010 · CVE-2026-42011 · CVE-2026-42012 · CVE-2026-42013 · CVE-2026-42014 · CVE-2026-42015 · CVE-2026-43027 · CVE-2026-43037 · CVE-2026-43038 · CVE-2026-43056 · CVE-2026-43074 · CVE-2026-43116 · CVE-2026-43125 · CVE-2026-43163 · CVE-2026-43190 · CVE-2026-43198 · CVE-2026-43260 · CVE-2026-43284 · CVE-2026-43303 · CVE-2026-43329 · CVE-2026-43499 · CVE-2026-43501 · CVE-2026-43868 · CVE-2026-43870 · CVE-2026-4437 · CVE-2026-4438 · CVE-2026-45852 · CVE-2026-46054 · CVE-2026-46086 · CVE-2026-46116 · CVE-2026-46173 · CVE-2026-46181 · CVE-2026-46242 · CVE-2026-46259 · CVE-2026-46300 · CVE-2026-46331 · CVE-2026-46333 · CVE-2026-46917 · CVE-2026-46968 · CVE-2026-47010 · CVE-2026-47021 · CVE-2026-47027 · CVE-2026-47059 · CVE-2026-47063 · CVE-2026-48144 · CVE-2026-48145 · CVE-2026-5260 · CVE-2026-52923 · CVE-2026-52991 · CVE-2026-53006 · CVE-2026-53009 · CVE-2026-53131 · CVE-2026-53189 · CVE-2026-53264 · CVE-2026-53266 · CVE-2026-5419 · CVE-2026-5450 · CVE-2026-55602 · CVE-2026-55603 · CVE-2026-55968 · CVE-2026-55970 · CVE-2026-58010 · CVE-2026-58011 · CVE-2026-58012 · CVE-2026-58013 · CVE-2026-58014 · CVE-2026-58015 · CVE-2026-58016 · CVE-2026-58662 · CVE-2026-59879 · CVE-2026-59880 · CVE-2026-60147 · CVE-2026-60589 · CVE-2026-61308 · CVE-2026-63913 · CVE-2026-63952 · CVE-2026-64017 · CVE-2026-64530 · CVE-2026-64560 · CVE-2026-70906 · CVE-2026-70907 · CVE-2026-74581 · CVE-2026-82417 · CVE-2026-82562 · CVE-2026-83605 · CVE-2026-83607 · CVE-2026-83608 · CVE-2026-83613 · CVE-2026-83614 · CVE-2026-83615 · CVE-2026-83616 · CVE-2026-83619

WID-SEC-W-2026-3596: IBM App Connect Enterprise: Mehrere Schwachstellen

CVE-2022-35948 · CVE-2026-13149 · CVE-2026-14257 · CVE-2026-15157 · CVE-2026-1527 · CVE-2026-16728 · CVE-2026-16729 · CVE-2026-18149 · CVE-2026-18540 · CVE-2026-19534 · CVE-2026-2391 · CVE-2026-45820 · CVE-2026-54272 · CVE-2026-63670 · CVE-2026-67213 · CVE-2026-67214 · CVE-2026-69152 · CVE-2026-69192 · CVE-2026-69198 · CVE-2026-73566 · CVE-2026-73646 · CVE-2026-77037 · CVE-2026-77063 · CVE-2026-77078 · CVE-2026-82333 · CVE-2026-82417 · CVE-2026-82562 · CVE-2026-83605 · CVE-2026-83606 · CVE-2026-83607 · CVE-2026-83608 · CVE-2026-83609 · CVE-2026-83610 · CVE-2026-83611 · CVE-2026-83612 · CVE-2026-83613 · CVE-2026-83614 · CVE-2026-83615 · CVE-2026-83616 · CVE-2026-83618 · CVE-2026-83619 · CVE-2026-84292 · CVE-2026-84371 · CVE-2026-84375 · CVE-2026-84890 · CVE-2026-84933 · CVE-2026-84947 · CVE-2026-84961 · CVE-2026-85008 · CVE-2026-85014 · CVE-2026-85024 · CVE-2026-85152

Source published
Sep 1, 2026, 2:27:26 PM (timezone not stated)
Source modified
Sep 4, 2026, 1:56:15 AM (timezone not stated)
Saved here
17 Nov 2026 19:30:46 UTC
Source terms
ENISA EUVD · source terms and attribution apply

Original source record · Cite this exact observation · Complete original publisher JSON

Source: euvd · ENISA EUVD · source terms and attribution apply. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.

EUVD CVSS 4.0 · 8.7 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

nvd · CVE-2026-83608

Published

xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. Prior to @xmldom/xmldom versions 0.8.15 and 0.9.12, and in xmldom version 0.6.0 and earlier, the DOCUMENT_TYPE_NODE branch in lib/dom.js validates publicId, systemId, and internalSubset under requireWellFormed: true but emits DocumentType.name verbatim. A name containing > or whitespace can terminate the <!DOCTYPE ...> declaration and inject sibling markup; the value can be supplied through createDocumentType() on the 0.8.x and unscoped lines or through a direct DocumentType.name property write on every affected line. The default path and legacy creation-time behavior remain permissive, while the vulnerable strict path fails to enforce an XML Name. This issue is fixed in @xmldom/xmldom versions 0.8.15 and 0.9.12; no fixed version is available for xmldom.

Additional publisher context

NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.

Source analysis status: Deferred

Weakness classifications: CWE-91

Original publisher date fields

published: 2026-09-01T15:17:38.800

lastModified: 2026-09-08T21:11:31.703

Source published
1 Sep 2026 15:17:38 UTC
Source modified
8 Sep 2026 21:11:31 UTC
Saved here
25 Oct 2026 16:19:10 UTC
Source terms
NIST NVD usage terms; underlying source attribution retained

Original source record · Cite this exact observation · Complete original publisher JSON

Source: nvd · NIST NVD usage terms; underlying source attribution retained. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.

CVSS 4.0 · [email protected] · Secondary · 8.7 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

osv · GHSA-27p8-2357-5qqv

Published

## Summary The `@xmldom/xmldom` serializer emits `DocumentType.name` verbatim into the `<!DOCTYPE …>` declaration with no well-formedness guard. GHSA-f6ww-3ggp-fr8h (CVE-2026-41674) hardened the serializer's `requireWellFormed` path for a DocumentType's sibling fields — `publicId`, `systemId`, and `internalSubset` — but it did **not** add any check for `name`. A `>` (or whitespace) in the name terminates the doctype declaration early, letting the remaining characters become sibling markup in the serialized output. Because `requireWellFormed: true` — the recommended mitigation for the prior xmldom injection CVEs — performs no validation on the DocType `name`, this is a bypass of that control, in the same family as the open element-name (GHSA-w2rr-34g9-rvrj) and attribute-name (GHSA-4w3w-2rp5-g8jm) name-injection advisories. ## Details The serializer's `DOCUMENT_TYPE_NODE` case runs the `requireWellFormed` block only against `publicId`, `systemId`, and `internalSubset`, then pushes `n.name` directly into the buffer between the `<!DOCTYPE ` prefix and the closing `>`: - 0.9.x (v0.9.10, `bb7a085`): [serializer DocType case, `lib/dom.js#L3256-L3283`](https://github.com/xmldom/xmldom/blob/bb7a085dc5ba1eea3212388509b97bb4b4af32b9/lib/dom.js#L3256-L3283) — the `requireWellFormed` block ([#L3259-L3269](https://github.com/xmldom/xmldom/blob/bb7a085dc5ba1eea3212388509b97bb4b4af32b9/lib/dom.js#L3259-L3269)) validates `publicId`/`systemId`/`internalSubset` but not `name`, which is emitted verbatim at [#L3270](https://github.com/xmldom/xmldom/blob/bb7a085dc5ba1eea3212388509b97bb4b4af32b9/lib/dom.js#L3270). - 0.8.x (v0.8.13, `e5c1480`): [serializer DocType case, `lib/dom.js#L1914-L1946`](https://github.com/xmldom/xmldom/blob/e5c14802592685bb872c042c54c3f73758875c85/lib/dom.js#L1914-L1946) — same structure; `name` is emitted verbatim at [#L1928](https://github.com/xmldom/xmldom/blob/e5c14802592685bb872c042c54c3f73758875c85/lib/dom.js#L1928). - unscoped `xmldom` (v0.6.0, `c80a161`): [`lib/dom.js#L1105`](https://github.com/xmldom/xmldom/blob/c80a161172cc4d8733583bf0cf59abfa589f6d9e/lib/dom.js#L1105) emits `node.name` verbatim; this line predates `requireWellFormed`, so there is no well-formedness path at all. ### Enabling write paths `DocumentType.name` is a plain, writable own-property, so the enabling vector differs by line: - **0.9.x** — `createDocumentType()` validates the name via `validateQualifiedName` ([`lib/dom.js#L925-L936`](https://github.com/xmldom/xmldom/blob/bb7a085dc5ba1eea3212388509b97bb4b4af32b9/lib/dom.js#L925-L936), validation at [#L926](https://github.com/xmldom/xmldom/blob/bb7a085dc5ba1eea3212388509b97bb4b4af32b9/lib/dom.js#L926)), so the deliverable vector is a **direct property write** (`dt.name = 'html><script>…'`) to the unguarded own-property. - **0.8.x** — `createDocumentType()` does **not** validate the name ([`lib/dom.js#L456-L464`](https://github.com/xmldom/xmldom/blob/e5c14802592685bb872c042c54c3f73758875c85/lib/dom.js#L456-L464)), so the malicious name is reachable directly through `createDocumentType()` as well as via direct property write. - **unscoped `xmldom` (<= 0.6.0)** — `createDocumentType()` does not validate the name ([`lib/dom.js#L286`](https://github.com/xmldom/xmldom/blob/c80a161172cc4d8733583bf0cf59abfa589f6d9e/lib/dom.js#L286)), same as 0.8.x. This is the same structural root cause the sibling name-injection advisories share: the serializer's `requireWellFormed` path validates content delimiters but no name field, and every name-like field is a plain writable property, so mutation / direct property-write bypasses any creation-time check. ### Root Cause 1. The serializer's `requireWellFormed` DocType block checks `publicId`, `systemId`, and `internalSubset` (the fields hardened by GHSA-f6ww-3ggp-fr8h) but has no check for `name`. 2. `DocumentType.name` is a plain writable own-property; on 0.8.x and the unscoped package `createDocumentType()` does not validate it either. 3. The serializer emits `name` directly between the doctype delimiters: `<!DOCTYPE ${name}…>`. ## Proof of Concept Run against `@xmldom/xmldom` v0.9.10 (commit `bb7a085`): ```javascript const { DOMImplementation, XMLSerializer, DOMParser } = require('@xmldom/xmldom'); const impl = new DOMImplementation(); const serializer = new XMLSerializer(); // 0.9.x createDocumentType validates the name, so overwrite it via direct property write const dt = impl.createDocumentType('html', '', ''); dt.name = 'html><script xmlns="http://www.w3.org/1999/xhtml">alert(1)</script'; const doc = impl.createDocument(null, 'r', dt); const output = serializer.serializeToString(doc, { requireWellFormed: true }); console.log(output); // Output: <!DOCTYPE html><script xmlns="http://www.w3.org/1999/xhtml">alert(1)</script><r/> // // requireWellFormed: true did NOT prevent the injection (no exception thrown). // The injected <script> is well-formed XHTML that a browser would execute. ``` Confirmed runtime behavior: - **0.9.x** — `createDocumentType()` rejects the malicious name at creation (`InvalidCharacterError`); a direct write to `dt.name` bypasses that, and `serializeToString(…, { requireWellFormed: true })` emits the breakout with no exception. - **Re-parse confirmation** — re-parsing the output shows the injected `<script>` is a real second top-level element originating entirely from the DocType name: the parser rejects it with `HierarchyRequestError: Only one element can be added and only after doctype`. A comment-injection variant (`dt.name = 'html><!--INJECTED--'`, output `<!DOCTYPE html><!--INJECTED--><r/>`) re-parses cleanly and the injected comment node is enumerable, confirming the injected node is structurally live. - **0.8.x** (v0.8.13, `e5c1480`) — `createDocumentType('html><script>…', '', '')` accepts the malicious name directly (no creation-time validation), and `serializeToString(doc, null, null, { requireWellFormed: true })` produces `<!DOCTYPE html><script>alert(1)</script><r/>` with no exception. A browser reproduction does not apply: browsers keep `DocumentType.name` `readonly`, so the direct-write vector cannot be reproduced in a browser DOM. The injection is specific to xmldom exposing `name` as writable and serializing it without a guard. ## Impact Applications that build a `DocumentType` node with an attacker-influenced `name` — via direct property write on any affected line, or via `createDocumentType()` on 0.8.x and the unscoped package — and serialize the document are vulnerable to XML/markup injection: - **XML structure injection** — breaking out of the `<!DOCTYPE …>` declaration to inject arbitrary sibling elements, comments, or additional markup into the output. - **XSS via XHTML** — if the serialized output is served as XHTML or processed by a browser-based XML parser, an injected `<script>` element (in the XHTML namespace) executes. - **requireWellFormed bypass** — applications that adopted `requireWellFormed: true` as a mitigation for the prior injection CVEs (including the sibling DocType fields fixed by GHSA-f6ww-3ggp-fr8h) remain vulnerable through the DocType `name`. ## Fix Applied Under `requireWellFormed`, the serializer validates the DocType `name` as a well-formed XML `Name` and throws `InvalidStateError` when it is not — matching the sibling `publicId`/`systemId`/`internalSubset` checks. Non-breaking and opt-in; ships on both maintained versions. No creation-time change is made: 0.9.x already validates the name at `createDocumentType`, and the 0.8.x/unscoped creation gap cannot be closed without a breaking change, so it is left unfixed. See the [XML `Name` production](https://www.w3.org/TR/xml/#NT-Name). > **⚠ Opt-in required.** Protection is not automatic. Existing serialization calls remain > vulnerable unless `{ requireWellFormed: true }` is explicitly passed. Applications that > serialize untrusted DOM content should audit all `serializeToString()` call sites and add it. ### Proof of Concept - fixed path ```javascript const { DOMImplementation, XMLSerializer } = require('@xmldom/xmldom'); const impl = new DOMImplementation(); const serializer = new XMLSerializer(); const dt = impl.createDocumentType('html', '', ''); dt.name = 'html><script xmlns="http://www.w3.org/1999/xhtml">alert(1)</script'; const doc = impl.createDocument(null, 'r', dt); // Default path: the ill-formed name is still emitted verbatim (injection present). console.log(serializer.serializeToString(doc)); // <!DOCTYPE html><script xmlns="http://www.w3.org/1999/xhtml">alert(1)</script><r/> // Opt-in path: serialization throws instead of emitting the breakout. serializer.serializeToString(doc, { requireWellFormed: true }); // throws InvalidStateError ``` ### Why the default stays verbatim W3C DOM Parsing's require-well-formed flag defaults to false, and the browser `XMLSerializer` emits the name verbatim in that default mode. Unconditionally throwing would be an unjustified breaking change against that specified default, so the guard is opt-in behind `{ requireWellFormed: true }`. ### Residual limitation The default serialization path still emits the ill-formed DocType `name` verbatim; protection applies only when `requireWellFormed: true` is passed. No creation-time validation is added for the DocType `name`: 0.9.x already validates at `createDocumentType`, and the 0.8.x/unscoped creation gap is left unfixed — it cannot be closed without a breaking change.

Source published
8 Sep 2026 21:02:51 UTC
Source modified
8 Sep 2026 21:15:03 UTC
Saved here
24 Oct 2026 13:17:17 UTC
Source terms
GitHub Advisory Database · CC-BY-4.0

Original source record · Cite this exact observation · Complete original publisher JSON

Source: osv · GitHub Advisory Database · CC-BY-4.0. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.

CVSS_V4 · 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

Publisher rating · HIGH

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 19 Nov 09:03 UTC · 273 of 275 readable · 269 fully read · documentation 469/469 current