CVE-2026-83605: xmldom: Attribute name injection via setAttribute() bypasses requireWellFormed

Published Sep 1, 2026
·
Updated

xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. Prior to @xmldom/xmldom versions 0.8.14 and 0.9.11, and in xmldom version 0.6.0 and earlier, Element.setAttribute() calls the private createAttribute(name) path without validating the attribute name, while Document.createAttribute(name) validates against QName. XMLSerializer.serializeToString() emits attribute names verbatim, and requireWellFormed: true did not validate them, so a crafted name can terminate the intended attribute and inject additional attributes, including event handlers, into browser-consumed output; synthesized xmlns:PREFIX declarations expose the same unchecked-name boundary. This issue is fixed in @xmldom/xmldom versions 0.8.14 and 0.9.11; no fixed version is available for xmldom.

Affected Software

2 affected components
npm/@xmldom/xmldom>0.8.13<=0.8.14, >0.9.10<=0.9.11, <=0.6.0
npm/xmldom

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade @xmldom/xmldom to a version that resolves this vulnerability.

    Fixed in 0.8.14
  2. Upgrade

    Upgrade @xmldom/xmldom to a version that resolves this vulnerability.

    Fixed in 0.9.11

Event History

Sep 1, 2026
CVE Published
via MITRE·02:18 PM
Data Sourced
via MITRE·02:18 PM
DescriptionWeakness

Frequently Asked Questions

1

Who is realistically exposed to this issue?

Applications are exposed when they use Element.setAttribute() with attacker-influenced attribute names and serialize the resulting DOM to XML that is consumed by a browser. The impact includes injection of additional attributes, such as event handlers, into that output.

2

Does enabling requireWellFormed prevent exploitation?

No. In affected versions, requireWellFormed: true did not validate attribute names emitted by XMLSerializer.serializeToString(), so it does not block this injection path.

3

What versions should be remediated?

For @xmldom/xmldom, upgrade to 0.8.14 or 0.9.11. xmldom has no fixed version available, so users of that package need to move to a maintained fixed package or otherwise ensure untrusted values cannot be used as attribute names.

4

How can I identify potentially affected code?

Review uses of Element.setAttribute() where the first argument can be influenced by external input, especially where the DOM is later passed to XMLSerializer.serializeToString() and rendered or otherwise consumed by a browser. Also review code that synthesizes xmlns:PREFIX declarations from unchecked names.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203