Html-to-text is a Node.js library designed for converting HTML content into readable plain text. Versions 2.1.2 and 2.1.3 share a common foundation, offering developers a reliable tool for extracting text from HTML documents. Both versions include dependencies like 'he' for HTML entity encoding/decoding, 'htmlparser' for parsing HTML, 'optimist' for command-line argument parsing, and 'underscore' and 'underscore.string' for utility functions. These dependencies equip the library with the necessary functionalities for robust HTML processing and text extraction.
The key difference between the two versions lies within their release dates. Version 2.1.3 was released on June 30, 2016, shortly after version 2.1.2. This temporal difference suggests that version 2.1.3 likely includes bug fixes, minor improvements, or dependency updates that were addressed following the release of version 2.1.2. While the data does not explicitly state the specific nature of these changes, developers using html-to-text are generally advised to utilize the latest version (2.1.3 in this case) to benefit from the most up-to-date and stable code. This helps ensure compatibility, security, and optimal performance when integrating the library into their projects for tasks such as email processing, data extraction, or content analysis. Both versions are licensed under the MIT license and are hosted on GitHub, encouraging community contributions and transparency.
All the vulnerabilities related to the version 2.1.3 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).