Regular Expression Denial of Service Vulnerability in Node-marked Package

node-marked Updated 02 Oct 2025

Summary

23/05/2025
N/A
Yes i
Unrated
Not published

DEBIAN-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 versions < 0.5.1+dfsg-1. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Node-marked is a popular JavaScript library used for parsing and converting Markdown into HTML. It is widely utilized in web applications to facilitate the rendering of Markdown content. However, certain versions of this package are vulnerable to a Regular Expression Denial of Service (ReDoS) attack, which can severely impact application performance and availability.

Vulnerability Detail

The vulnerability in Node-marked arises from catastrophic backtracking in several regular expressions used for parsing HTML tags and markdown links. This flaw allows an attacker to craft specially structured markdown input, such as deeply nested brackets or repetitive tag attributes, causing the parser to hang. As a result, this can lead to a Denial of Service, where legitimate users are unable to access the application due to its unresponsiveness.

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 updating is not feasible, consider implementing input validation to restrict the types of markdown input that can be processed. This can help mitigate the risk of an attacker exploiting the vulnerability.

Conclusion

The Node-marked package is vulnerable to a ReDoS attack due to flaws in its regular expressions. It is crucial to update to version 0.5.1+dfsg-1 to mitigate this risk. Additionally, using tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

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 become unresponsive.

You can use Vulert, which monitors open-source vulnerabilities in your software. By simply uploading your manifest file, such as package-lock.json, you can receive real-time alerts regarding vulnerabilities.

Symptoms may include slow performance, application hangs, or complete unresponsiveness when processing certain markdown inputs.

Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

Implement input validation to restrict the types of markdown input processed by your application until you can update to the patched version.

Related vulnerabilities

Recent vulnerabilities recorded for node-marked.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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