Sass version 1.9.2 represents a minor iteration in the evolution of this popular pure JavaScript implementation of the Sass stylesheet language. Building upon the foundation laid by version 1.9.1, this update, released on July 13, 2018, continues to provide developers with a robust tool for writing maintainable and efficient CSS. Both versions share the same core feature set, offering complete compatibility with the Sass language specification, empowering developers to leverage variables, mixins, functions, and other advanced features for streamlined CSS development.
A crucial shared dependency is chokidar (version 2.0.0 or higher), enabling Sass to efficiently watch files and directories for changes, automatically re-compiling Sass files when updates are detected. This "watch mode" functionality is invaluable for developers seeking a smooth and automated workflow. Both versions are licensed under the permissive MIT license, giving developers freedom to use, modify, and distribute the software.
While the core functionality remains consistent, a notable difference lies in the unpacked size of the distributed package. Version 1.9.2 has a slightly smaller unpacked size of 687,844 bytes, compared to version 1.9.1's 688,306 bytes which suggests some optimization or minor code changes occurred between the releases. The release date also sets them apart with a difference of 2 days, indicating that 1.9.2 could contain bug fixes or small improvements implemented after the release of 1.9.1. Developers should always consult the official changelog for a comprehensive list of changes.
All the vulnerabilities related to the version 1.9.2 of the package
Uncontrolled resource consumption in braces
The NPM package braces
fails to limit the number of characters it can handle, which could lead to Memory Exhaustion. In lib/parse.js,
if a malicious user sends "imbalanced braces" as input, the parsing will enter a loop, which will cause the program to start allocating heap memory without freeing it at any moment of the loop. Eventually, the JavaScript heap limit is reached, and the program will crash.
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.