@xmldom/xmldom is vulnerable to XML Injection
87
High Risk
Element.setAttribute() creates attribute nodes through a private helper that performs no validation, unlike the public createAttribute() which rejects invalid names. The serializer escapes attribute values but writes attribute names verbatim, so a name containing quote and space characters can terminate one attribute and inject additional attributes into the output. The requireWellFormed serialization option did not check attribute names, leaving applications that used it as a mitigation exposed to injected event handlers and overridden security attributes. The fix makes the requireWellFormed serializer validate each serialized attribute's qualified name and throw before emitting it.
You are affected if you are using a version that falls within the vulnerable range and you call setAttribute() with user-controlled attribute names and serialize the result, including when you rely on the requireWellFormed: true option to reject invalid names.
@xmldom/xmldom is vulnerable to XML Injection in versions 0.9.0 - 0.9.10 and 0.7.0 - 0.8.13.
Upgrade the @xmldom/xmldom library to the patch version and pass { requireWellFormed: true } to serializeToString().
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant