Ts-loader version 5.4.5 and 5.4.4 are both TypeScript loaders for webpack, enabling developers to seamlessly integrate TypeScript code into their webpack-based projects. Examining the differences between these two versions can inform developers about potential updates, bug fixes, or feature enhancements that might impact their build process.
The most immediate difference is the release date, with version 5.4.5 published on May 1, 2019 and version 5.4.4 on April 26, 2019, suggesting a quick follow-up release. A subtle discrepancy can be found in the @types/node dependency within devDependencies. Version 5.4.4 specifies a version range starting from ^10.0.0, while version 5.4.5 relaxes this constraint to simply *, indicating compatibility with all versions. Additionally, there is a small difference in the unpacked size of the packages, with version 5.4.5 being slightly smaller at 340941 bytes compared to version 5.4.4 at 344911 bytes. This could suggest minor optimizations or changes in the bundled files. Both versions share the same core dependencies, peer dependencies on TypeScript, development dependencies, license, repository details, and author information, pointing towards a focused, incremental update within a short timeframe. If you're using ts-loader, check the changelog for detailed information to see if the bump fixes any issue relevant to your project.
All the vulnerabilities related to the version 5.4.5 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.