Regular Expression Denial of Service Vulnerability in node-marked Package

node-marked Updated 02 Oct 2025

Summary

23/05/2025
N/A
Yes i
High
7.5

CVE-2018-25110: Marked prior to version 0.3.17 is vulnerable to a Regular Expression Denial of Service (ReDoS) attack due to catastrophic backtracking in several regular expressions used for parsing HTML tags and markdown links. Affects node-marked across 3 version ranges.

< 0.5.1+dfsg-1 < 20bfc106013ed45713a21672ad4a34df94dcd485 < 4252cad46232530a87215aa32d30a97f20b3c44f

Fixed in 0.5.1+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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The node-marked package is a widely used Markdown parser for Node.js applications, enabling developers to convert Markdown text into HTML. It is known for its speed and flexibility, making it a popular choice among developers. However, prior to version 0.3.17, it is susceptible to a Regular Expression Denial of Service (ReDoS) attack, which can severely impact application performance and availability.

Vulnerability Detail

The vulnerability arises from catastrophic backtracking in several regular expressions used for parsing HTML tags and markdown links. An attacker can exploit this vulnerability by providing specially crafted markdown input, such as deeply nested or repetitively structured brackets or tag attributes. This can cause the parser to hang, leading to a Denial of Service, where legitimate users are unable to access the application.

How To Fix

Minimum fixed version

0.5.1+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 immediate upgrading is not feasible, consider sanitizing user input to prevent deeply nested structures or limiting the complexity of markdown that can be processed by the application. This can be done by implementing input validation checks before passing data to the node-marked parser.

Conclusion

The node-marked package is vulnerable to a Regular Expression Denial of Service attack in versions prior to 0.3.17. It is crucial to update to the patched version to ensure application security and performance. Additionally, implementing input validation can serve as a temporary workaround while the update is applied.

See every vulnerability recorded for node-marked →

Share this vulnerability

FAQ

A ReDoS attack exploits the way certain regular expressions are processed, causing the application to consume excessive resources and potentially crash.

You can check if your application is affected by using the Vulert playground at Vulert Scanner, which allows you to analyze your manifest file without requiring any signup.

Failure to address this vulnerability can lead to application downtime, loss of user trust, and potential financial losses due to service interruptions.

No, the vulnerability exists in versions prior to 0.3.17. Versions 0.5.1+dfsg-1 and later have been patched.

Vulert is a tool that monitors and alerts for open-source vulnerabilities in software using just a manifest file like package-lock.json. It provides real-time alerts for vulnerabilities, helping developers maintain secure applications.

Related vulnerabilities

Recent vulnerabilities recorded for node-marked.

How To Fix

Minimum fixed version

0.5.1+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