Affected versions of this package are vulnerable to XML Injection in the escapeCDATA function in lib/builder.js. An attacker can inject arbitrary XML elements and attributes into the generated document by supplying a value, serialized with the cdata option, that contains two or more ]]> sequences, since only the first is escaped and any later one prematurely closes the CDATA section ahead of attacker-controlled content. This requires the application to enable the non-default cdata: true builder option.