CVE-2026-83618: xmldom: requireWellFormed DocType publicId/systemId validation is bypassable via an embedded line terminator

Published Sep 1, 2026
·
Updated

xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. From 0.9.10 until 0.9.12, the requireWellFormed: true serializer validates DocumentType.publicId and DocumentType.systemId with PubidLiteralmatch and SystemLiteralmatch expressions produced by reg() in lib/grammar.js, which inherit the multiline flag. A complete valid literal on the first line can therefore satisfy the matcher while U+000A, U+000D, U+2028, or U+2029 and breakout markup remain in the emitted <!DOCTYPE ...> declaration. This bypasses the strict-serialization mitigation for the earlier DocumentType injection advisory; creation and direct property assignment remain unvalidated by design. This issue is fixed in @xmldom/xmldom version 0.9.12.

Affected Software

1 affected component
xmldom xmldom>=0.9.10<0.9.12

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.9.12

Event History

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

Frequently Asked Questions

1

Which deployments are affected?

Affected versions are from 0.9.10 until 0.9.12 where serialization uses requireWellFormed: true. The issue concerns DocumentType publicId or systemId values passed to the serializer.

2

What must an attacker control to exploit this?

An attacker needs to influence a DocumentType.publicId or DocumentType.systemId value that is serialized. A valid literal on the first line followed by U+000A, U+000D, U+2028, or U+2029 and breakout markup can bypass validation.

3

Does requireWellFormed: true fully mitigate DocumentType injection?

No. In the affected versions, embedded line terminators bypass the publicId and systemId validation even when requireWellFormed is true. DocumentType creation and direct property assignment are unvalidated by design.

4

What version fixes the issue?

The issue is fixed in @xmldom/xmldom version 0.9.12.

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