Regular Expression Denial of Service in node-marked

node-marked Updated 02 Oct 2025

Summary

07/06/2018
N/A
Yes i
High
7.5

CVE-2017-16114: The marked module is vulnerable to a regular expression denial of service. Affects node-marked across 2 version ranges.

< 0.3.9+dfsg-1 < 3a4f7a5dae661f0844cb7b07e8667b5666ffc83e

Fixed in 0.3.9+dfsg-1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

node-marked is a popular library used for parsing markdown files in Node.js applications. It provides a simple and efficient way to convert markdown syntax into HTML. However, the library is vulnerable to a regular expression denial of service (ReDoS) attack.

Vulnerability Detail

The vulnerability (CVE-2017-16114) arises from the way node-marked handles regular expressions. An attacker can exploit this vulnerability by providing a specially crafted input that triggers a ReDoS attack. This can lead to a denial of service, where the application becomes unresponsive for a significant amount of time. In this case, a payload of just 1k characters can block the application for approximately 6 seconds.

How To Fix

Minimum fixed version

0.3.9+dfsg-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade node-marked

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If updating the library is not feasible, you can implement input validation to mitigate the risk of a ReDoS attack. Ensure that user-supplied input is properly validated and limit the length of input strings to prevent excessive backtracking in regular expressions.

Conclusion

The regular expression denial of service vulnerability in node-marked can lead to a denial of service attack, impacting the availability of the application. It is crucial to update the library to the fixed version or implement input validation to mitigate the risk. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for node-marked →

Share this vulnerability

FAQ

A ReDoS attack is a type of denial of service attack where an attacker provides a malicious input that causes a regular expression to take an excessive amount of time to evaluate. This can lead to a significant impact on the performance of the application.

The vulnerability can result in a denial of service, where the application becomes unresponsive for a significant amount of time. This can disrupt the normal operation of the application and impact its availability.

Yes, updating node-marked to version 0.3.9+dfsg-1 or later will fix the vulnerability. It is recommended to update the library as soon as possible.

Implementing input validation and limiting the length of input strings can help mitigate the risk of a ReDoS attack. However, updating the library to the fixed version is the recommended solution.

You can find more information about this vulnerability, including technical details and the fix, in the official CVE-2017-16114 report: https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2017-16114.json

Related vulnerabilities

Recent vulnerabilities recorded for node-marked.

How To Fix

Minimum fixed version

0.3.9+dfsg-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade node-marked

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback