Html-to-text is a valuable Node.js library for developers needing to extract readable text from HTML content. Version 2.1.0, released on March 30, 2016, builds upon the solid foundation of its predecessor, version 2.0.0, which was released on February 22, 2016. Both versions share core functionalities, including robust HTML parsing powered by the htmlparser dependency, character encoding handling via he, command-line argument parsing with optimist, and the utility of underscore and underscore.string for enhanced string manipulation. The development dependency section remains the same, meaning that chai and mocha are still used for testing the library.
Essentially, the primary difference between version 2.0.0 and 2.1.0 lies in the potential bug fixes, performance improvements or minor feature enhancements incorporated within the roughly month-long interval between releases. While the core feature set remains largely consistent, developers should consider upgrading to version 2.1.0 to benefit from any such improvements to stability and efficiency.
For developers considering using html-to-text, both versions provide a versatile solution for stripping away HTML markup and obtaining clean, usable text. The library's MIT license allows for flexible integration into various projects, and its active development, as evidenced by these releases, suggests ongoing maintenance and improvements. Referencing the project's GitHub repository is crucial for understanding the specific changes introduced in version 2.1.0 and for staying updated with the latest advancements in the library.
All the vulnerabilities related to the version 2.1.0 of the package
Prototype Pollution in minimist
Affected versions of minimist are vulnerable to prototype pollution. Arguments are not properly sanitized, allowing an attacker to modify the prototype of Object, causing the addition or modification of an existing property that will exist on all objects.
Parsing the argument --__proto__.y=Polluted adds a y property with value Polluted to all objects. The argument --__proto__=Polluted raises and uncaught error and crashes the application.
This is exploitable if attackers have control over the arguments being passed to minimist.
Upgrade to versions 0.2.1, 1.2.3 or later.
Prototype Pollution in minimist
Minimist prior to 1.2.6 and 0.2.4 is vulnerable to Prototype Pollution via file index.js, function setKey() (lines 69-95).