Marked, a popular and speedy markdown parser, released version 2.0.4, building incrementally upon the previous stable version 2.0.3. The core functionality remains consistent, ensuring continued reliability for developers using Marked to process markdown content. The primary changes between the versions are in the development dependencies, reflecting updates in the tooling used to build and maintain the library, enhancing the development environment and potentially improving long-term stability.
Specifically, several key development dependencies saw version bumps. These include upgrades to ESLint (from 7.23.0 to 7.26.0), Rollup (from 2.44.0 to 2.48.0), Babel Core (from 7.13.14 to 7.14.2) and Preset Env (from 7.13.12 to 7.14.2), and semantic-release (from 17.4.2 to 17.4.3) along with several packages related to semantic-release and Rollup. While these updates might not directly translate into immediately noticeable changes in the rendered markdown output for end-users or developers integrating Marked, they are important for the ongoing health and maintainability of the project. By staying current with the latest versions of these tools, the Marked team can leverage new features, bug fixes, and security patches, improving the library's resilience. Uglify-js was also updated from 3.13.3 to 3.13.6. Developers can expect continued reliable markdown parsing with subtle improvements in underlying code quality and tooling.
All the vulnerabilities related to the version 2.0.4 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: