Vulnerability in @xmldom/xmldom (CVE-2026-41672)
Summary
Vulnerability in @xmldom/xmldom (CVE-2026-41672). Data can be tampered with by attackers. Exploitable via node.data. Mitigation: upgrade to 0.9.10 or later.
Original description
The description as published by the source.
Summary
The package allows attacker-controlled comment content to be serialized into XML without validating or neutralizing comment breaking sequences. As a result, an attacker can terminate the comment early and inject arbitrary XML nodes into the serialized output.
Details
The issue is in the DOM construction and serialization flow for comment nodes.
When createComment(data) is called, the supplied string is stored as comment data through the generic character-data handling path. That content is kept as-is. Later, when the document is serialized, the serializer writes comment nodes by concatenating the XML comment delimiters with the stored node.data value directly.
That behavior is unsafe because XML comments are a syntax-sensitive context. If attacker-controlled input contains a sequence that closes the comment, the serializer does not preserve it as literal comment text. Instead, it emits output where the remainder of the payload is treated as live XML markup.
This is a real injection bug, not a formatting issue. The serializer already applies context-aware handling in other places, such as escaping text nodes and rewriting unsafe CDATA terminators. Comment content does not receive equivalent treatment. Because of that gap, untrusted data can break out of the comment boundary and modify the structure of the final XML document.
PoC
const { DOMImplementation, DOMParser, XMLSerializer } = require('@xmldom/xmldom');
const doc = new DOMIm…
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-41672 has been found in @xmldom/xmldom.
Attackers can target a specific entry point like node.data over the network to misuse the product.
Data can be tampered with by attackers. CVSS score: 7.5/10.
What to do: upgrade @xmldom/xmldom to 0.9.10 or later.
If unsure, ask your IT team or search "@xmldom/xmldom CVE-2026-41672" on the vendor's site.
CVE-2026-41672 (@xmldom/xmldom) — CWE-91 / CVSS v3 7.5
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: node.data / appendData / insertData / replaceData
Patched: 0.9.10 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-91) exists in @xmldom/xmldom. Attackers reach the vulnerable code path via node.data without authentication.
Check the vendor advisory for the affected versions of @xmldom/xmldom. Attack surface: node.data / appendData / insertData / replaceData.
Severity: High (CVSS 7.5/10). Data can be tampered with by attackers.
Update to 0.9.10.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r '@xmldom/xmldom' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r '@xmldom/xmldom' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
@xmldom/xmldomを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade @xmldom/xmldom to 0.9.10ステージング環境で 0.9.10 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
Fix status by distribution
Fixed packages published by each distribution for this CVE
- Debian DEBIAN-CVE-2026-41672 node-xmldom
- Ubuntu UBUNTU-CVE-2026-41672 node-xmldom
References
- advisory nvd.nist.gov
- package github.com
- web github.com
- web security-advisories@github.com
- web security-advisories@github.com
- web security-advisories@github.com
- web security-advisories@github.com
- web security-advisories@github.com
- web github.com
- web access.redhat.com
- web access.redhat.com
- web bugzilla.redhat.com
- web security.access.redhat.com
- web access.redhat.com