Vulnerability library
Security checkSeptember 02, 2026

xmldom: XML fragment injection via invalid EntityReference.nodeName during requireWellFormed serialization - xmldom

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Medium severitynpmxmldom

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

An EntityReference node can be created with an invalid, attacker-controlled name through Document.createEntityReference(name). When this node is serialized directly with:

the invalid nodeName is emitted into the serialized XML fragment without validation or escaping.

This can produce real XML markup in the serialized output.

Recommendation

No fix is available yet. Followings are affected versions:

  • <= 0.6.0

References

Could your website be exposed too?

SmartScanner can check your website for xmldom: XML fragment injection via invalid EntityReference.nodeName during requireWellFormed serialization - xmldom and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated September 02, 2026