Sass version 1.10.2 introduces subtle but potentially impactful changes compared to its predecessor, version 1.10.1. Both versions maintain the core functionality of providing a pure JavaScript implementation of Sass, allowing developers to seamlessly integrate Sass compilation into their JavaScript-based workflows without relying on Ruby. This makes Sass accessible across various environments and build processes. The fundamental details such as description, dependencies on chokidar for file watching, MIT license, repository location, and author information remain consistent across both versions, ensuring continuity for existing users.
The key difference lies in the details of the packaged distribution. While both versions comprise four files, the unpacked size of version 1.10.2 is slightly smaller at 688,158 bytes compared to 688,213 bytes in version 1.10.1. This suggests minor optimizations or adjustments in the codebase or included assets. Moreover, the release date indicates that version 1.10.2 was published on August 2, 2018, a week after version 1.10.1 released on July 25, 2018. This short iteration period may signal the resolution of minor bug fixes or performance enhancements identified in the previous release. While the changelogs aren't provided, developers upgrading from 1.10.1 should be aware of this potential for minor adjustments, especially if they encountered any specific issues in the earlier version. These subtle changes in file size and release cadence highlight the ongoing refinement of the Dart Sass JavaScript implementation.
All the vulnerabilities related to the version 1.10.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.