GHSA-wjmf-58vc-xqjr: Marked Content Injection Vulnerability
MODERATEGHSA-wjmf-58vc-xqjr is a MODERATE content injection vulnerability (General Security Weakness) affecting Marked libraries in the npm ecosystem. The issue involves content injection in marked. Remediation is available by upgrading affected packages to version 0.3.9.
GHSA-wjmf-58vc-xqjr at a Glance
How to Fix GHSA-wjmf-58vc-xqjr
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.3.9
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-wjmf-58vc-xqjr, 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.3.9), 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 General Security Weakness. 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-wjmf-58vc-xqjr Affected Marked Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
marked
|
npm |
< 0.3.9
|
0.3.9
|
References
Frequently Asked Questions
What is GHSA-wjmf-58vc-xqjr?
Which Marked versions are affected?
What version fixes GHSA-wjmf-58vc-xqjr?
Is marked affected?
What CWE is associated with GHSA-wjmf-58vc-xqjr?
How can I check npm dependencies for GHSA-wjmf-58vc-xqjr?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wjmf-58vc-xqjr",
"modified" : "2021-02-25T02:01:56Z",
"published" : "2021-02-25T02:01:56Z",
"withdrawn" : "2021-02-25T02:01:56Z",
"aliases" : [ ],
"summary" : "Content injection in marked",
"details" : "Versions 0.3.7 and earlier of marked When mangling is disabled via option mangle don't escape target href. This allow attacker to inject arbitrary html-event into resulting a tag.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "marked"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.3.9"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/markedjs/marked/issues/926"
}, {
"type" : "WEB",
"url" : "https://github.com/markedjs/marked/commit/cb72584c5d9d32ebfdbb99e35fb9b81af2b79686"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2019-06-05T20:56:48Z",
"nvd_published_at" : null
}
}