GHSA-wx77-rp39-c6vg: Markdown Denial of Service Vulnerability

LOW
CWE-400
Published
Advisory Summary

GHSA-wx77-rp39-c6vg is a LOW denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Markdown libraries in the npm ecosystem. The issue involves regular expression denial of service in markdown. Remediation is available in the latest vendor maintenance releases.

GHSA-wx77-rp39-c6vg at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-wx77-rp39-c6vg
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Markdown
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-wx77-rp39-c6vg

To remediate this vulnerability, upgrade all affected Markdown dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

markdown fixed: Latest secure release
npm install markdown@Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls markdown

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-wx77-rp39-c6vg, inspect your project dependencies using npm:

npm ls markdown

Analyze the terminal output to locate any version of Markdown in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The npm ls markdown command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Markdown, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

All versions of `markdown` are vulnerable to Regular Expression Denial of Service (ReDoS). The `markdown.toHTML()` function has significantly degraded performance when parsing long strings containing underscores. This may lead to Denial of Service if the parser accepts user input. ## Recommendation No fix is currently available. Consider using an alternative package until a fix is made available.

GHSA-wx77-rp39-c6vg Affected Markdown Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
markdown
npm
≥ 0.0.0

References

Frequently Asked Questions

What is GHSA-wx77-rp39-c6vg?
GHSA-wx77-rp39-c6vg is a security vulnerability in Markdown involving Regular Expression Denial of Service in markdown under CWE-400: Uncontrolled Resource Consumption.
Which Markdown versions are affected?
Affected versions include releases prior to current release patches across affected packages: markdown.
What version fixes GHSA-wx77-rp39-c6vg?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is markdown affected?
Yes, markdown is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with GHSA-wx77-rp39-c6vg?
GHSA-wx77-rp39-c6vg is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check npm dependencies for GHSA-wx77-rp39-c6vg?
Run the dependency tree command: 'npm ls markdown'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-wx77-rp39-c6vg",
  "modified" : "2022-03-24T22:10:13Z",
  "published" : "2020-09-04T15:11:03Z",
  "aliases" : [ ],
  "summary" : "Regular Expression Denial of Service in markdown",
  "details" : "All versions of `markdown` are vulnerable to Regular Expression Denial of Service (ReDoS). The `markdown.toHTML()` function has significantly degraded performance when parsing long strings containing underscores. This may lead to Denial of Service if the parser accepts user input.\n\n\n## Recommendation\n\nNo fix is currently available. Consider using an alternative package until a fix is made available.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "markdown"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "PACKAGE",
    "url" : "https://github.com/evilstreak/markdown-js"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1330"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-08-31T18:55:21Z",
    "nvd_published_at" : null
  }
}