Ts-loader version 3.3.0 introduces several key updates compared to version 3.2.0, primarily focused on development dependencies. Most notably, the supported TypeScript version jumps from 2.6.1 to a 2.7.0-dev snapshot (specifically 2.7.0-dev.20180120), allowing developers to leverage the latest features and improvements offered by the TypeScript nightly builds. This update enables users to access cutting-edge language capabilities and experiment with upcoming changes, while using the most recent version of ts-loader.
Additionally, a new development dependency, "@types/micromatch":"^3.1.0" has been added; it's worth noting.
However, micromatch has been upgraded from "^3.1.4" to a version that is no longer specified here. Furthermore, karma-webpack moves from version "^2.0.1" to "^2.0.6". These updates reflect advancements in tooling and testing infrastructure used in the ts-loader development process. Developers should consider these dependency bumps if they are integrating ts-loader into existing projects with specific version constraints.
The core dependencies, such as chalk, semver, loader-utils, and enhanced-resolve, remain unchanged, suggesting a focused effort on updating development workflows and ensuring compatibility with new TypeScript features without altering the fundamental functionality of the loader itself. This makes ts-loader 3.3.0 a worthwhile upgrade for developers keen on staying current with the TypeScript language and utilizing advanced testing practices.
All the vulnerabilities related to the version 3.3.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.