Rollup Plugin Typescript2, a tool designed for seamless integration between Rollup and Typescript, released version 0.19.2 shortly after version 0.19.1, both on January 18th, 2019. While the core functionality remained consistent, evident in the matching descriptions emphasizing error reporting, some subtle yet potentially impactful distinctions emerged.
The most noticeable change is in the peerDependencies section. Version 0.19.1 declared a peer dependency on rollup versions ">=1.0.0", but 0.19.2 shifted this requirement to ">=0.68.0". This adjustment significantly broadens the compatibility of the plugin, allowing developers using older versions of Rollup (0.68.0 and above) to leverage the plugin. This widening of support offers greater flexibility for projects not yet ready to upgrade to the latest Rollup.
The devDependencies also show a change in the version of rollup-plugin-typescript2 used for development - 0.18.1 in version 0.19.1, and 0.19.1 in version 0.19.2. This is not necessarily a functional difference, but it can suggest the latest version includes internal tests for the functionality introduced in the previous one using the direct import to the immediate previous version.
Finally, the unpacked size of version 0.19.2 is minutely larger (4264746 bytes vs 4264745 bytes), suggesting possibly minor code changes or adjustments. Developers should consider these version changes, especially the relaxed Rollup peer dependency, when choosing the plugin version for their projects.
All the vulnerabilities related to the version 0.19.2 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.
Regular Expression Denial of Service in braces
Versions of braces prior to 2.3.1 are vulnerable to Regular Expression Denial of Service (ReDoS). Untrusted input may cause catastrophic backtracking while matching regular expressions. This can cause the application to be unresponsive leading to Denial of Service.
Upgrade to version 2.3.1 or higher.
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.