XML injection in xmldom - #VU142548
Published: August 14, 2026
Vulnerability details
The vulnerability allows a remote attacker to inject attributes into serialized output.
The vulnerability exists due to improper input validation in Element.setAttribute() and XMLSerializer when processing user-controlled attribute names during serialization. A remote attacker can supply a crafted attribute name to inject attributes into serialized output.
This can include injection of event handler attributes into HTML output consumed by browsers, and the issue occurs because attribute names are emitted verbatim while only attribute values are escaped.