GHSA-ccrp-c664-8p4j: Markdown to jsx Cross-Site Scripting Vulnerability
HIGHGHSA-ccrp-c664-8p4j is a HIGH cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Markdown to jsx libraries in the npm ecosystem. The issue involves cross-site scripting in markdown-to-jsx. Remediation is available by upgrading affected packages to version 6.11.4.
GHSA-ccrp-c664-8p4j at a Glance
How to Fix GHSA-ccrp-c664-8p4j
To remediate this vulnerability, upgrade all affected Markdown to jsx 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 markdown-to-jsx@6.11.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls markdown-to-jsx
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-ccrp-c664-8p4j, inspect your project dependencies using npm:
npm ls markdown-to-jsx
Analyze the terminal output to locate any version of Markdown to jsx in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.11.4), your application is affected.
Note: The npm ls markdown-to-jsx 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Markdown to jsx, 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-ccrp-c664-8p4j Affected Markdown to jsx Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
markdown-to-jsx
|
npm |
< 6.11.4
|
6.11.4
|
References
Frequently Asked Questions
What is GHSA-ccrp-c664-8p4j?
Which Markdown to jsx versions are affected?
What version fixes GHSA-ccrp-c664-8p4j?
Is markdown-to-jsx affected?
What CWE is associated with GHSA-ccrp-c664-8p4j?
How can I check npm dependencies for GHSA-ccrp-c664-8p4j?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-ccrp-c664-8p4j",
"modified" : "2021-09-29T19:59:57Z",
"published" : "2020-09-03T21:17:36Z",
"aliases" : [ ],
"summary" : "Cross-Site Scripting in markdown-to-jsx",
"details" : "Versions of `markdown-to-jsx` prior to 6.11.4 are vulnerable to Cross-Site Scripting. Due to insufficient input sanitization the package may render output containing malicious JavaScript. This vulnerability can be exploited through input of links containing `data` or VBScript URIs and a base64-encoded payload.\n\n\n## Recommendation\n\nUpgrade to version 6.11.4 or later.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "markdown-to-jsx"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.11.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/probablyup/markdown-to-jsx/pull/307"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/probablyup/markdown-to-jsx"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/1219"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-08-31T18:51:20Z",
"nvd_published_at" : null
}
}