GHSA-ch52-vgq2-943f: Marked Denial of Service Vulnerability

LOW
CWE-1333
Published
Advisory Summary

GHSA-ch52-vgq2-943f is a LOW denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Marked libraries in the npm ecosystem. The issue involves regular expression denial of service in marked. Remediation is available by upgrading affected packages to version 0.7.0.

GHSA-ch52-vgq2-943f at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-ch52-vgq2-943f
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product Marked
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-ch52-vgq2-943f

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

marked fixed: 0.7.0
npm install marked@0.7.0
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 marked

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-ch52-vgq2-943f, inspect your project dependencies using npm:

npm ls marked

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

Note: The npm ls marked 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-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In Marked, 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

Affected versions of `marked` are vulnerable to Regular Expression Denial of Service (ReDoS). The `_label` subrule may significantly degrade parsing performance of malformed input. ## Recommendation Upgrade to version 0.7.0 or later.

GHSA-ch52-vgq2-943f Affected Marked Versions

1 component(s)
Fixed Versions:
0.7.0
Product / Package Ecosystem Affected Versions Fixed Version
marked
npm
≥ 0.4.0
< 0.7.0
0.7.0

References

Frequently Asked Questions

What is GHSA-ch52-vgq2-943f?
GHSA-ch52-vgq2-943f is a security vulnerability in Marked involving Regular Expression Denial of Service in marked under CWE-1333: Inefficient Regular Expression Complexity.
Which Marked versions are affected?
Affected versions include releases prior to 0.7.0 across affected packages: marked.
What version fixes GHSA-ch52-vgq2-943f?
Upgrading to 0.7.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is marked affected?
Yes, marked is affected in releases prior to 0.7.0. Upgrade your dependency to 0.7.0 or later.
What CWE is associated with GHSA-ch52-vgq2-943f?
GHSA-ch52-vgq2-943f is classified under CWE-1333: Inefficient Regular Expression Complexity (The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.).
How can I check npm dependencies for GHSA-ch52-vgq2-943f?
Run the dependency tree command: 'npm ls marked'. 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-ch52-vgq2-943f",
  "modified" : "2020-08-31T18:46:28Z",
  "published" : "2020-09-03T18:15:53Z",
  "aliases" : [ ],
  "summary" : "Regular Expression Denial of Service in marked",
  "details" : "Affected versions of `marked` are vulnerable to Regular Expression Denial of Service (ReDoS). The `_label` subrule may significantly degrade parsing performance of malformed input.\n\n\n## Recommendation\n\nUpgrade to version 0.7.0 or later.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "marked"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.4.0"
      }, {
        "fixed" : "0.7.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1076"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-08-31T18:46:28Z",
    "nvd_published_at" : null
  }
}