Regular Expression Denial of Service in simple-markdown

simple-markdown Updated 02 Oct 2025

Summary

03/09/2020
MODERATE
Yes i
Moderate
5.3

GHSA-4xf9-pgvv-xx67: Regular Expression Denial of Service in simple-markdown. Affects simple-markdown versions < 0.5.2. Fixed in 0.5.2. 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 simple-markdown package is an npm package used for parsing and rendering Markdown text. It provides a simple and efficient way to convert Markdown syntax into HTML or other formats. The package is widely used in various projects and applications.

Vulnerability Detail

The vulnerability in simple-markdown is a Regular Expression Denial of Service (ReDoS) issue. It affects versions prior to 0.5.2. The specific function SimpleMarkdown.defaultInlineParse() has a performance degradation when parsing inline code blocks. This can be exploited by an attacker to cause a denial of service by providing specially crafted input that triggers the slow regex pattern matching, leading to excessive CPU usage and potentially crashing the application. The impact of this vulnerability is moderate.

How To Fix

Minimum fixed version

0.5.2

This is the first release that contains the fix.

npm install simple-markdown@0.5.2

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

Workaround

There is no specific workaround mentioned for this vulnerability. The recommended solution is to upgrade to the fixed version of the package.

Conclusion

In conclusion, the simple-markdown package prior to version 0.5.2 is vulnerable to a Regular Expression Denial of Service (ReDoS) issue. This can be exploited by an attacker to cause a denial of service. To mitigate the vulnerability, it is crucial to upgrade to version 0.5.2 or later. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for simple-markdown →

Share this vulnerability

FAQ

simple-markdown is an npm package used for parsing and rendering Markdown text. It provides a convenient way to convert Markdown syntax into HTML or other formats.

A Regular Expression Denial of Service (ReDoS) vulnerability occurs when a regular expression pattern is susceptible to excessive backtracking, leading to a significant degradation in performance. This can be exploited by an attacker to cause a denial of service by providing specially crafted input that triggers the slow regex pattern matching.

The impact of this vulnerability is moderate. An attacker can exploit the vulnerability to cause a denial of service by consuming excessive CPU resources, potentially leading to application crashes.

To fix the vulnerability, it is recommended to upgrade to version 0.5.2 or later of the simple-markdown package. This version includes the necessary fixes to address the ReDoS issue.

There is no specific workaround mentioned for this vulnerability. The recommended solution is to upgrade to the fixed version of the package.

Related vulnerabilities

Recent vulnerabilities recorded for simple-markdown.

How To Fix

Minimum fixed version

0.5.2

This is the first release that contains the fix.

npm install simple-markdown@0.5.2

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