Skip to content
OpenAdvisories
High · 8.7 CVE-2026-41674 EUVD-2026-28289GHSA-f6ww-3ggp-fr8h

xmldom: XML injection through unvalidated DocumentType serialization

Published May 7, 2026 · Updated Sep 10, 2026 · Assigned by GitHub_M

Description

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.

Affected products

VendorProductAffectedFixed
xmldom xmldom xmldom <= 0.6.0, @xmldom/xmldom >= 0.9.0, < 0.9.10, @xmldom/xmldom < 0.8.13 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 node-xmldom 0.9.10-1 —
Debian 13 node-xmldom No fix yet —
Debian 12 node-xmldom No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 node-xmldom No fix yet —
Ubuntu 26.04 LTS node-xmldom No fix yet —
Ubuntu 25.10 node-xmldom No fix yet —
Ubuntu 24.04 LTS node-xmldom No fix yet —
Ubuntu 22.04 LTS node-xmldom No fix yet —
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS node-xmldom No fix yet —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling npm 11.13.0-r1 —
Wolfi rolling saf 1.6.0-r0 —
Wolfi rolling sqlpad 7.5.7-r18 —

Affected packages

EcosystemPackageAffectedFixedRecord
npm @xmldom/xmldom < 0.8.13 0.8.13 GHSA-f6ww-3ggp-fr8h
npm @xmldom/xmldom >= 0.9.0, < 0.9.10 0.9.10 GHSA-f6ww-3ggp-fr8h
npm xmldom <= 0.6.0 — GHSA-f6ww-3ggp-fr8h

Advisories 1

References