ts-loader 3.5.0 provides a minor upgrade over version 3.4.0, continuing to serve as a crucial tool for developers using TypeScript with webpack. Both versions maintain the core functionality of seamlessly integrating TypeScript code into webpack's module bundling process, streamlining the development workflow for large-scale JavaScript projects. The key dependencies like chalk, semver, micromatch, loader-utils, and enhanced-resolve remain consistent, ensuring stability and compatibility with the broader ecosystem.
A notable change lies in the updated development dependencies. Version 3.5.0 upgrades typescript to ^2.7.1 from 2.7.0-dev.20180120 indicating a move to a stable release and mocha to ^5.0.0, while v3.4.0 had mocha at ^4.0.0. This update allows developers to leverage the latest TypeScript features without compatibility issues and take advantage of further testings features. The update to fs-extra from version 4.0.0 to version 5.0.0 might lead to an improvement of the file system operations as well.
For developers, these changes primarily represent a focus on stability and staying current with the TypeScript language and newer versions of the testing framework mocha. Upgrading to version 3.5.0 ensures access to the most recent bug fixes and performance improvements within the TypeScript compiler and the testing suite, leading to a smoother and more efficient development experience. Both versions are licensed under the MIT license and maintained by James Brantly, reinforcing the project's commitment to open-source principles and community collaboration.
All the vulnerabilities related to the version 3.5.0 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.
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.