Prettier version 0.13.1 introduces a notable shift in its dependencies compared to the previous stable release, version 0.11.0, impacting developers relying on consistent dependency resolution. The key difference lies in the ast-types package. In version 0.11.0, ast-types was sourced directly from a Git repository. However, version 0.13.1 now pulls ast-types directly from npm (version 0.9.4), streamlining dependency management and potentially improving installation speeds and reliability. Additionally, version 0.13.1 adds jest-validate as a new dependency.
Both versions share the same core functionality as an opinionated JavaScript formatter, powered by dependencies like babylon, esutils, and flow-parser for parsing, and glob and get-stdin for file input. They also leverage the same suite of development dependencies, including jest for testing and rollup with various plugins for bundling. This means the core development workflow and build process remain consistent.
Developers considering upgrading to version 0.13.1 should be aware of the ast-types source change. This could affect projects relying on specific, unreleased features or bug fixes present in the Git version used by 0.11.0. Furthermore, the introduction of jest-validate might subtly alter the validation process, so testing is advisable after upgrading. Overall, the upgrade appears targeted at refining dependency handling and might introduce minor internal changes, requiring a degree of caution during deployment.
All the vulnerabilities related to the version 0.13.1 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).