Sass version 1.13.0 introduces subtle changes over its predecessor, version 1.12.0, within the pure JavaScript implementation of the popular Sass stylesheet language. Both versions maintain the core functionality of compiling Sass into CSS, and share the same dependency on chokidar for file watching capabilities. The license remains MIT, ensuring developers can freely use and modify the library. The source code repository also stays constant, hosted on GitHub under the sass/dart-sass project. Even the author and their contact information remain identical between the two releases.
A key difference lies in the package's unpacked size. Version 1.13.0 has a slightly smaller unpacked size of 692067 bytes, compared to 1.12.0's 692338 bytes. This indicates a possible optimization in the codebase, potentially leading to minor improvements in performance or resource usage. However, the file count remains at 4 for both versions, suggesting that the size difference emerges from modifications within the existing files rather than structural changes. The release dates also differentiate them, with version 1.13.0 being released on August 17, 2018, two days after version 1.12.0's release on August 15, 2018. For developers, this means upgrading from 1.12.0 to 1.13.0 should be a seamless process with very little risk of breaking changes and a possible small optimization in size.
All the vulnerabilities related to the version 1.13.0 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.