The xml2js package, a popular tool for converting XML into JavaScript objects, saw a minor version update from 0.4.15 to 0.4.16 in January 2016. While both versions retain the same core functionality and MIT license, examining the differences can be beneficial for developers considering which version to use. Both versions share identical dependencies, including sax (version >=0.6.0), but differ in their xmlbuilder dependency. Version 0.4.15 requires xmlbuilder version >=2.4.6, while version 0.4.16 shifts to xmlbuilder with a caret dependency ^4.1.0. This indicates a potential upgrade providing access to new features or fixes in newer xmlbuilder releases. Developers using xml2js should assess compatibility breaking changes or feature enhancements in xmlbuilder between releases before upgrading. The developer dependencies for testing, documentation, and code coverage remained consistent between the two versions, implying a focus on stability and quality assurance. Ultimately, the choice between xml2js 0.4.15 and 0.4.16 hinges primarily on the desired version of xmlbuilder. Developers should consult the xmlbuilder changelog for details on the changes introduced in the updates, and test to ensure that existing functionalities are working as expected.
All the vulnerabilities related to the version 0.4.16 of the package
xml2js is vulnerable to prototype pollution
xml2js versions before 0.5.0 allows an external attacker to edit or add new properties to an object. This is possible because the application does not properly validate incoming JSON keys, thus allowing the __proto__
property to be edited.