Marked version 1.1.0 introduces several updates to its development dependencies compared to the previous stable version 1.0.0, potentially indicating improvements in the build process, testing, and code quality. Upgrades to eslint from version 6.8.0 to 7.0.0 suggest adherence to newer linting rules, possibly enhancing code maintainability. Likewise, @babel/core advances from 7.9.0 to 7.9.6, along with @babel/preset-env jumping from 7.9.5 to 7.9.6. These Babel updates infer improvements in JavaScript transpilation, potentially supporting newer language features or optimizing for different browser environments.
Other notable changes include an update to @markedjs/html-differ from version 3.0.1 to 3.0.2 and rollup-plugin-license from 2.0.0 to 2.0.1. While seemingly minor, these updates could bring bug fixes and performance enhancements within the HTML diffing and license management aspects of the build process. The uglify-js dependency also sees a bump from 3.9.1 to 3.9.3. Developers using Marked should find that these cumulative changes contribute to a more robust and modern development pipeline, potentially resulting in a more reliable and performant markdown parser. Specifically, the increase in unpacked Size from 223332 to 233972 may indicates the inclusion of new features, improved performance or better documentation.
All the vulnerabilities related to the version 1.1.0 of the package
Inefficient Regular Expression Complexity in marked
What kind of vulnerability is it?
Denial of service.
The regular expression inline.reflinkSearch
may cause catastrophic backtracking against some strings.
PoC is the following.
import * as marked from 'marked';
console.log(marked.parse(`[x]: x
\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](`));
Who is impacted?
Anyone who runs untrusted markdown through marked and does not use a worker with a time limit.
Has the problem been patched?
Yes
What versions should users upgrade to?
4.0.10
Is there a way for users to fix or remediate the vulnerability without upgrading?
Do not run untrusted markdown through marked or run marked on a worker thread and set a reasonable time limit to prevent draining resources.
Are there any links users can visit to find out more?
If you have any questions or comments about this advisory:
Inefficient Regular Expression Complexity in marked
What kind of vulnerability is it?
Denial of service.
The regular expression block.def
may cause catastrophic backtracking against some strings.
PoC is the following.
import * as marked from "marked";
marked.parse(`[x]:${' '.repeat(1500)}x ${' '.repeat(1500)} x`);
Who is impacted?
Anyone who runs untrusted markdown through marked and does not use a worker with a time limit.
Has the problem been patched?
Yes
What versions should users upgrade to?
4.0.10
Is there a way for users to fix or remediate the vulnerability without upgrading?
Do not run untrusted markdown through marked or run marked on a worker thread and set a reasonable time limit to prevent draining resources.
Are there any links users can visit to find out more?
If you have any questions or comments about this advisory: