CVE-2026-83610: xmldom: XML fragment injection via invalid EntityReference.nodeName during requireWellFormed serialization
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.
References
- github.com/advisories/GHSA-6gmq-8vp8-gcm6
- github.com/xmldom/xmldom/commit/4664386e4f4d99d17b416a151dbe8323e245284b
- github.com/xmldom/xmldom/commit/6c3fb5ffeafe7901ec928ce9010988dd716c94a0
- github.com/xmldom/xmldom/pull/1071
- github.com/xmldom/xmldom/pull/1072
- github.com/xmldom/xmldom/releases/tag/0.8.15
- github.com/xmldom/xmldom/releases/tag/0.9.12
- github.com/xmldom/xmldom/security/advisories/GHSA-6gmq-8vp8-gcm6
- nvd.nist.gov/vuln/detail/CVE-2026-83610
Code Behaviors & Features
Detect and mitigate CVE-2026-83610 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →