Prettier version 1.2.2 is a minor release following 1.2.1 in the popular JavaScript code formatter. Examining the package data, the core dependencies remain identical between the two versions, indicating that the fundamental parsing and formatting logic likely hasn't undergone major changes. Both versions share the same core dependencies like glob, chalk, babylon, esutils, minimist, ast-types, get-stdin, flow-parser, jest-validate, and babel-code-frame, crucial for Prettier's functionality.
Similarly, the development dependencies are also the same, which suggests no shift in the testing or build tooling. This includes packages such as diff, jest, mkdirp, rimraf, rollup, typescript, and various Rollup plugins for bundling and managing different module types.
The key distinction lies in the release date. Version 1.2.2 was published shortly after 1.2.1, specifically, on April 19, 2017, with roughly an hour and a half between releases. Although, the data doesn't explain the reasons, this temporal proximity hints at a quick fix or patch released in 1.2.2 addressing a minor bug or issue uncovered in 1.2.1. Developers should consider this update if they encountered issues or inconsistencies with 1.2.1. For fresh installations, 1.2.2 is the recommended choice because it might offer refined stability and correctness.
All the vulnerabilities related to the version 1.2.2 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).