Lint-staged, a popular tool for running linters on Git staged files, has released version 15.2.2, a minor update following version 15.2.1. Both versions share identical dependencies critical to their core functionalities, including yaml, chalk, debug, execa, listr2, pidtree, commander, lilconfig, micromatch, and string-argv. The development dependencies also remain consistent, featuring tools such as jest, husky, eslint, prettier, and others necessary for testing, linting, and maintaining code quality. This suggests a focus on internal improvements or bug fixes rather than significant feature additions.
The key difference lies in the dist property of the package. Version 15.2.2 has an unpackedSize of 120058 bytes, subtly larger than version 15.2.1's 119713 bytes. This slight increase, alongside a more recent release date (February 5, 2024 vs. January 31, 2024), indicate that the latest version likely contains resolved bugs, performance tweaks, or minor documentation updates building upon the solid foundation of the prior release. For developers, upgrading to 15.2.2 presents a low-risk way to benefit from the latest enhancements while ensuring continued compatibility with an already stable tool. The file count remains the same between the versions at 34.
All the vulnerabilities related to the version 15.2.2 of the package
Regular Expression Denial of Service (ReDoS) in micromatch
The NPM package micromatch
prior to version 4.0.8 is vulnerable to Regular Expression Denial of Service (ReDoS). The vulnerability occurs in micromatch.braces()
in index.js
because the pattern .*
will greedily match anything. By passing a malicious payload, the pattern matching will keep backtracking to the input while it doesn't find the closing bracket. As the input size increases, the consumption time will also increase until it causes the application to hang or slow down. There was a merged fix but further testing shows the issue persisted prior to https://github.com/micromatch/micromatch/pull/266. This issue should be mitigated by using a safe pattern that won't start backtracking the regular expression due to greedy matching.