CVE-2026-83610
xmldom: XML fragment injection via invalid EntityReference.nodeName during requireWellFormed serialization
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, Document.createEntityReference(name) accepts an invalid name and the ENTITY_REFERENCE_NODE serializer emits the resulting nodeName directly in &name; form. Directly serializing the node or fragment with XMLSerializer.serializeToString() and requireWellFormed: true can therefore break the entity-reference boundary and produce attacker-controlled XML markup when reparsed. The parser does not ordinarily create these nodes, and element-child insertion is rejected, so exploitation requires an application to create and directly serialize an EntityReference. This issue is fixed in @xmldom/xmldom versions 0.8.15 and 0.9.12; no fixed version is available for xmldom.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
6.3
xmldom: XML fragment injection via invalid EntityReference.nodeName during requireWellFormed serialization
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, Document.createEntityReference(name) accepts an invalid name and the ENTITY_REFERENCE_NODE serializer emits the resulting nodeName directly in &name; form. Directly serializing the node or fragment with XMLSerializer.serializeToString() and requireWellFormed: true can therefore break the entity-reference boundary and produce attacker-controlled XML markup when reparsed. The parser does not ordinarily create these nodes, and element-child insertion is rejected, so exploitation requires an application to create and directly serialize an EntityReference. This issue is fixed in @xmldom/xmldom versions 0.8.15 and 0.9.12; no fixed version is available for xmldom.
- Record
CVE-2026-83610- CVSS 4.0
- 6.3 Medium
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N - Weakness
- CWE-116
- Updated
- 2026-11-02
EUVDEUVD-2026-69222
6.3
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, Document.createEntityReference(name) accepts an invalid name and the ENTITY_REFERENCE_NODE serializer emits the resulting nodeName directly in &name; form. Directly serializing the node or fragment with XMLSerializer.serializeToString() and requireWellFormed: true can therefore break the entity-reference boundary and produce attacker-controlled XML markup when reparsed. The parser does not ordinarily create these nodes, and element-child insertion is rejected, so exploitation requires an application to create and directly serialize an EntityReference. This issue is fixed in @xmldom/xmldom versions 0.8.15 and 0.9.12; no fixed version is available for xmldom.
- Record
EUVD-2026-69222- CVSS 4.0
- 6.3 Medium
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-6gmq-8vp8-gcm6
6.3
xmldom: XML fragment injection via invalid EntityReference.nodeName during requireWellFormed serialization
Summary
An EntityReference node can be created with an invalid, attacker-controlled name through Document.createEntityReference(name). When this node is serialized directly with:
serializer.serializeToString(ref, { requireWellFormed: true })
the invalid nodeName is emitted into the serialized XML fragment without validation or escaping.
This can produce real XML markup in the serialized output. In the proof of concept below, the serialized fragment contains <injected/>, and reparsing the fragment creates a real injected element.
Details
The issue appears to be in the serialization path for ENTITY_REFERENCE_NODE.
For several other node types, requireWellFormed: true performs specific validation checks before serialization. For example, comments, processing instructions, document types, and some character data cases are checked before being emitted.
However, for ENTITY_REFERENCE_NODE, the serializer appears to emit the node name directly in entity reference form:
case ENTITY_REFERENCE_NODE:
buf.push('&', n.nodeName, ';');
return null;
As a result, if nodeName contains characters that break out of the intended &name; structure, the serializer can emit additional XML markup.
For example, an entity reference created with the name:
safe; <injected/> &x
is serialized as:
&safe; <injected/> &x;
When this fragment is later parsed in an XML context, <injected/> becomes a real element.
This is especially surprising when { requireWellFormed: true } is used, because applications may reasonably treat this mode as the stricter or safer XML serialization mode.
Proof of Concept
Tested with:
@xmldom/[email protected]
Node.js v24.18.0
Windows 10 / PowerShell
'use strict';
const { DOMImplementation, XMLSerializer, DOMParser } = require('@xmldom/xmldom');
const impl = new DOMImplementation();
const doc = impl.createDocument(null, 'root', null);
const serializer = new XMLSerializer();
function countInjected(fragment) {
try {
const parsed = new DOMParser().parseFromString(`<root>${fragment}</root>`, 'application/xml');
return parsed.getElementsByTagName('injected').length;
} catch (e) {
return `PARSE_THROW ${e.name}: ${e.message}`;
}
}
for (const name of [
'safe',
'safe; <injected/> &x',
'x<injected',
'x y'
]) {
try {
const ref = doc.createEntityReference(name);
const xml = serializer.serializeToString(ref, { requireWellFormed: true });
console.log(`[SERIALIZED] ${JSON.stringify(name)}: ${xml}`);
console.log(`[INJECTED_COUNT] ${JSON.stringify(name)}: ${countInjected(xml)}`);
} catch (e) {
console.log(`[THROW] ${JSON.stringify(name)}: ${e.name}: ${e.message}`);
}
}
Observed output:
[SERIALIZED] "safe": &safe;
[INJECTED_COUNT] "safe": 0
[SERIALIZED] "safe; <injected/> &x": &safe; <injected/> &x;
[INJECTED_COUNT] "safe; <injected/> &x": 1
[SERIALIZED] "x<injected": &x<injected;
[INJECTED_COUNT] "x<injected": 0
[SERIALIZED] "x y": &x y;
[INJECTED_COUNT] "x y": 0
Impact
An application that creates an EntityReference from attacker-controlled input and then serializes that node or XML fragment with requireWellFormed: true may produce XML containing attacker-controlled markup.
The impact is limited by two observations:
- The parser does not create
EntityReferencenodes from ordinary XML entity references. - Appending an
EntityReferencenode as an element child is rejected with aHierarchyRequestError.
The main affected scenario is applications that directly use createEntityReference(name) and then serialize the resulting node or fragment.
Fix Applied
Two complementary, non-breaking fixes.
(1) document.createEntityReference(name) rejects an invalid Name at creation, closing the reachable creation vector by default — the opt-in serializer check alone cannot, since a later nodeName mutation would bypass a creation-only…
- Record
GHSA-6gmq-8vp8-gcm6- CVSS 4.0
- 6.3 Medium
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N - Weakness
- CWE-116
- Updated
- 2026-11-02
NVD
6.3
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, Document.createEntityReference(name) accepts an invalid name and the ENTITY_REFERENCE_NODE serializer emits the resulting nodeName directly in &name; form. Directly serializing the node or fragment with XMLSerializer.serializeToString() and requireWellFormed: true can therefore break the entity-reference boundary and produce attacker-controlled XML markup when reparsed. The parser does not ordinarily create these nodes, and element-child insertion is rejected, so exploitation requires an application to create and directly serialize an EntityReference. This issue is fixed in @xmldom/xmldom versions 0.8.15 and 0.9.12; no fixed version is available for xmldom.
- Record
CVE-2026-83610- CVSS 4.0
- 6.3 Medium
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/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 - Weakness
- CWE-116
- Updated
- 2026-11-02
OSV
6.3
xmldom: XML fragment injection via invalid EntityReference.nodeName during requireWellFormed serialization
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, Document.createEntityReference(name) accepts an invalid name and the ENTITY_REFERENCE_NODE serializer emits the resulting nodeName directly in &name; form. Directly serializing the node or fragment with XMLSerializer.serializeToString() and requireWellFormed: true can therefore break the entity-reference boundary and produce attacker-controlled XML markup when reparsed. The parser does not ordinarily create these nodes, and element-child insertion is rejected, so exploitation requires an application to create and directly serialize an EntityReference. This issue is fixed in @xmldom/xmldom versions 0.8.15 and 0.9.12; no fixed version is available for xmldom.
- Record
CVE-2026-83610- CVSS 4.0
- 6.3 Medium
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N - Weakness
- CWE-116
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2026-83610
6.3
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, Document.createEntityReference(name) accepts an invalid name and the ENTITY_REFERENCE_NODE serializer emits the resulting nodeName directly in &name; form. Directly serializing the node or fragment with XMLSerializer.serializeToString() and requireWellFormed: true can therefore break the entity-reference boundary and produce attacker-controlled XML markup when reparsed. The parser does not ordinarily create these nodes, and element-child insertion is rejected, so exploitation requires an application to create and directly serialize an EntityReference. This issue is fixed in @xmldom/xmldom versions 0.8.15 and 0.9.12; no fixed version is available for xmldom.
- Record
DEBIAN-CVE-2026-83610- CVSS 4.0
- 6.3 Medium
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/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 - Updated
- 2026-11-02
Show 7 moreShow less
OSVGHSA-6gmq-8vp8-gcm6
6.3
xmldom: XML fragment injection via invalid EntityReference.nodeName during requireWellFormed serialization
Summary
An EntityReference node can be created with an invalid, attacker-controlled name through Document.createEntityReference(name). When this node is serialized directly with:
serializer.serializeToString(ref, { requireWellFormed: true })
the invalid nodeName is emitted into the serialized XML fragment without validation or escaping.
This can produce real XML markup in the serialized output. In the proof of concept below, the serialized fragment contains <injected/>, and reparsing the fragment creates a real injected element.
Details
The issue appears to be in the serialization path for ENTITY_REFERENCE_NODE.
For several other node types, requireWellFormed: true performs specific validation checks before serialization. For example, comments, processing instructions, document types, and some character data cases are checked before being emitted.
However, for ENTITY_REFERENCE_NODE, the serializer appears to emit the node name directly in entity reference form:
case ENTITY_REFERENCE_NODE:
buf.push('&', n.nodeName, ';');
return null;
As a result, if nodeName contains characters that break out of the intended &name; structure, the serializer can emit additional XML markup.
For example, an entity reference created with the name:
safe; <injected/> &x
is serialized as:
&safe; <injected/> &x;
When this fragment is later parsed in an XML context, <injected/> becomes a real element.
This is especially surprising when { requireWellFormed: true } is used, because applications may reasonably treat this mode as the stricter or safer XML serialization mode.
Proof of Concept
Tested with:
@xmldom/[email protected]
Node.js v24.18.0
Windows 10 / PowerShell
'use strict';
const { DOMImplementation, XMLSerializer, DOMParser } = require('@xmldom/xmldom');
const impl = new DOMImplementation();
const doc = impl.createDocument(null, 'root', null);
const serializer = new XMLSerializer();
function countInjected(fragment) {
try {
const parsed = new DOMParser().parseFromString(`<root>${fragment}</root>`, 'application/xml');
return parsed.getElementsByTagName('injected').length;
} catch (e) {
return `PARSE_THROW ${e.name}: ${e.message}`;
}
}
for (const name of [
'safe',
'safe; <injected/> &x',
'x<injected',
'x y'
]) {
try {
const ref = doc.createEntityReference(name);
const xml = serializer.serializeToString(ref, { requireWellFormed: true });
console.log(`[SERIALIZED] ${JSON.stringify(name)}: ${xml}`);
console.log(`[INJECTED_COUNT] ${JSON.stringify(name)}: ${countInjected(xml)}`);
} catch (e) {
console.log(`[THROW] ${JSON.stringify(name)}: ${e.name}: ${e.message}`);
}
}
Observed output:
[SERIALIZED] "safe": &safe;
[INJECTED_COUNT] "safe": 0
[SERIALIZED] "safe; <injected/> &x": &safe; <injected/> &x;
[INJECTED_COUNT] "safe; <injected/> &x": 1
[SERIALIZED] "x<injected": &x<injected;
[INJECTED_COUNT] "x<injected": 0
[SERIALIZED] "x y": &x y;
[INJECTED_COUNT] "x y": 0
Impact
An application that creates an EntityReference from attacker-controlled input and then serializes that node or XML fragment with requireWellFormed: true may produce XML containing attacker-controlled markup.
The impact is limited by two observations:
- The parser does not create
EntityReferencenodes from ordinary XML entity references. - Appending an
EntityReferencenode as an element child is rejected with aHierarchyRequestError.
The main affected scenario is applications that directly use createEntityReference(name) and then serialize the resulting node or fragment.
Fix Applied
Two complementary, non-breaking fixes.
(1) document.createEntityReference(name) rejects an invalid Name at creation, closing the reachable creation vector by default — the opt-in serializer check alone cannot, since a later nodeName mutation would bypass a creation-only…
- Record
GHSA-6gmq-8vp8-gcm6- CVSS 4.0
- 6.3 Medium
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N - Weakness
- CWE-116
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-83610
6.3
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, Document.createEntityReference(name) accepts an invalid name and the ENTITY_REFERENCE_NODE serializer emits the resulting nodeName directly in &name; form. Directly serializing the node or fragment with XMLSerializer.serializeToString() and requireWellFormed: true can therefore break the entity-reference boundary and produce attacker-controlled XML markup when reparsed. The parser does not ordinarily create these nodes, and element-child insertion is rejected, so exploitation requires an application to create and directly serialize an EntityReference. This issue is fixed in @xmldom/xmldom versions 0.8.15 and 0.9.12; no fixed version is available for xmldom.
- Record
UBUNTU-CVE-2026-83610- CVSS 4.0
- 6.3 Medium
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N - Updated
- 2026-11-02
OSVAZL-99339 No score
CVE-2026-83610 affecting package python-tensorboard 2.16.2-6
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, Document.createEntityReference(name) accepts an invalid name and the ENTITY_REFERENCE_NODE serializer emits the resulting nodeName directly in &name; form. Directly serializing the node or fragment with XMLSerializer.serializeToString() and requireWellFormed: true can therefore break the entity-reference boundary and produce attacker-controlled XML markup when reparsed. The parser does not ordinarily create these nodes, and element-child insertion is rejected, so exploitation requires an application to create and directly serialize an EntityReference. This issue is fixed in @xmldom/xmldom versions 0.8.15 and 0.9.12; no fixed version is available for xmldom.
- Record
AZL-99339- Updated
- 2026-11-02
OSVCLSA-2026-1788561202 No score
TuxCare security update for xmldom (1 CVE)
TuxCare rebuilt xmldom to address 1 CVE. Fixed in 0.1.31-tuxcare.4.
- Record
CLSA-2026-1788561202- Updated
- 2026-11-02
OSVCLSA-2026-1790608669 No score
TuxCare security update for @xmldom/xmldom (9 CVEs)
TuxCare rebuilt @xmldom/xmldom to address 9 CVEs. Fixed in 0.9.10-tuxcare.1.
- Record
CLSA-2026-1790608669- Updated
- 2026-11-02
OSVCLSA-2026-1790755546 No score
TuxCare security update for @xmldom/xmldom (14 CVEs)
TuxCare rebuilt @xmldom/xmldom to address 14 CVEs. Fixed in 0.7.13-tuxcare.1.
- Record
CLSA-2026-1790755546- Updated
- 2026-11-02
OSVCLSA-2026-1791192659 No score
TuxCare security update for @xmldom/xmldom (10 CVEs)
TuxCare rebuilt @xmldom/xmldom to address 10 CVEs. Fixed in 0.9.8-tuxcare.2.
- Record
CLSA-2026-1791192659- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
@xmldom/xmldomnpm |
0.7.0 to 0.8.14 | 0.8.15 |
@xmldom/xmldomnpm |
0.9.0 to 0.9.11 | 0.9.12 |
xmldomnpm |
through 0.6.0 | None known |
python-tensorboardAzure Linux:3 |
through 2.16.2-6 | None known |
xmldomTuxCare:npm |
0.1.31-tuxcare.0 up to 0.1.31-tuxcare.4, plus listed versions 0.1.310.1.31-tuxcare.10.1.31-tuxcare.20.1.31-tuxcare.3 |
0.1.31-tuxcare.4 |
@xmldom/xmldomTuxCare:npm From an advisory covering 9 CVEs |
0.9.10-tuxcare.0 up to 0.9.10-tuxcare.1, plus listed versions 0.9.10 |
0.9.10-tuxcare.1 |
@xmldom/xmldomTuxCare:npm From an advisory covering 14 CVEs |
0.7.13-tuxcare.0 up to 0.7.13-tuxcare.1, plus listed versions 0.7.13 |
0.7.13-tuxcare.1 |
@xmldom/xmldomTuxCare:npm From an advisory covering 8 CVEs |
0.9.8-tuxcare.0 up to 0.9.8-tuxcare.2, plus listed versions 0.9.80.9.8-tuxcare.1 |
0.9.8-tuxcare.2 |
node-xmldomDebian:12 |
All versions, plus listed versions 0.8.6-10.9.10-10.9.10-20.9.11-10.9.12-1 Show 5 moreShow less0.9.5-10.9.6-10.9.8-10.9.8-20.9.9-1 |
None known |
node-xmldomDebian:13 |
All versions, plus listed versions 0.9.10-10.9.10-20.9.11-10.9.12-10.9.6-10.9.8-10.9.8-20.9.9-1 |
None known |
Show 8 moreShow less
| Package | Affected | Fixed |
|---|---|---|
node-xmldomDebian:14 |
before 0.9.12-1, plus listed versions 0.9.10-10.9.10-20.9.11-10.9.6-10.9.8-10.9.8-20.9.9-1 |
0.9.12-1 |
@xmldom/xmldomnpm |
0.7.0 up to 0.8.15 | 0.8.15 |
@xmldom/xmldomnpm |
0.9.0 up to 0.9.12 | 0.9.12 |
node-xmldomUbuntu:20.04:LTS |
All versions, plus listed versions 0.1.27+ds-10.1.27+ds-1+deb10u2build0.20.04.1 |
None known |
node-xmldomUbuntu:22.04:LTS |
All versions, plus listed versions 0.5.0-10.7.3-10.7.5-10.7.5-1ubuntu0.22.04.1 |
None known |
node-xmldomUbuntu:24.04:LTS |
All versions, plus listed versions 0.8.6-1 |
None known |
node-xmldomUbuntu:26.10 |
All versions, plus listed versions 0.9.8-20.9.10-20.9.11-1 |
None known |
node-xmldomUbuntu:26.04:LTS |
All versions, plus listed versions 0.9.6-10.9.8-10.9.8-2 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-83610 is a medium vulnerability (CVSS 6.3) in @xmldom Xmldom, published September 1, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.59%, the 48th percentile. Fixed in @xmldom/xmldom 0.8.15.
References
github.com/xmldom/xmldom/security/advisories/GHSA-6gmq-8vp8-gcm6
github.com/xmldom/xmldom/pull/1071
github.com/xmldom/xmldom/pull/1072
github.com/xmldom/xmldom/commit/4664386e4f4d99d17b416a151dbe8323e245284b
github.com/xmldom/xmldom/commit/6c3fb5ffeafe7901ec928ce9010988dd716c94a0
github.com/xmldom/xmldom/releases/tag/0.8.15
Show 8 moreShow less
github.com/xmldom/xmldom/releases/tag/0.9.12
nvd.nist.gov/vuln/detail/CVE-2026-83610
github.com/advisories/GHSA-6gmq-8vp8-gcm6
github.com/CVEProject/cvelistV5/tree/main/cves/2026/83xxx/CVE-2026-83610.json
security-tracker.debian.org/tracker/CVE-2026-83610
github.com/xmldom/xmldom
ubuntu.com/security/CVE-2026-83610
cve.org/CVERecord?id=CVE-2026-83610
Left out here: the rest of 2 source descriptions. The JSON record has them.