GHSA-xf5p-87ch-gxw2: Marked Denial of Service Vulnerability
MODERATEGHSA-xf5p-87ch-gxw2 is a MODERATE (CVSS 5.3) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Marked libraries in the npm ecosystem. The issue involves marked redos due to email addresses being evaluated in quadratic time. Remediation is available by upgrading affected packages to version 0.6.2.
GHSA-xf5p-87ch-gxw2 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix GHSA-xf5p-87ch-gxw2
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.
npm install marked@0.6.2
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-xf5p-87ch-gxw2, 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.6.2), 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. 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
GHSA-xf5p-87ch-gxw2 Affected Marked Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
marked
|
npm |
≥ 0.3.14
< 0.6.2
|
0.6.2
|
References
Frequently Asked Questions
What is GHSA-xf5p-87ch-gxw2?
Which Marked versions are affected?
What version fixes GHSA-xf5p-87ch-gxw2?
Is marked affected?
What is the CVSS score of GHSA-xf5p-87ch-gxw2?
What CWE is associated with GHSA-xf5p-87ch-gxw2?
How can I check npm dependencies for GHSA-xf5p-87ch-gxw2?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xf5p-87ch-gxw2",
"modified" : "2022-08-02T17:43:57Z",
"published" : "2019-06-05T14:10:03Z",
"aliases" : [ ],
"summary" : "Marked ReDoS due to email addresses being evaluated in quadratic time",
"details" : "Versions of `marked` from 0.3.14 until 0.6.2 are vulnerable to Regular Expression Denial of Service. Email addresses may be evaluated in quadratic time, allowing attackers to potentially crash the node process due to resource exhaustion.\n\n\n## Recommendation\n\nUpgrade to version 0.6.2 or later.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "marked"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.3.14"
}, {
"fixed" : "0.6.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/markedjs/marked/pull/1460"
}, {
"type" : "WEB",
"url" : "https://github.com/markedjs/marked/commit/b15e42b67cec9ded8505e9d68bb8741ad7a9590d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/markedjs/marked"
}, {
"type" : "WEB",
"url" : "https://github.com/markedjs/marked/releases/tag/v0.6.2"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-JS-MARKED-174116"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/812"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2019-06-05T13:50:35Z",
"nvd_published_at" : null
}
}