GHSA-ccrp-c664-8p4j: Markdown to jsx Cross-Site Scripting Vulnerability

HIGH
CWE-79
Published
Advisory Summary

GHSA-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

CVE Identifier N/A
GHSA Identifier GHSA-ccrp-c664-8p4j
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Markdown to jsx
Package Ecosystem npm
Published Date
Last Updated

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.

markdown-to-jsx fixed: 6.11.4
npm install markdown-to-jsx@6.11.4
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-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

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. ## Recommendation Upgrade to version 6.11.4 or later.

GHSA-ccrp-c664-8p4j Affected Markdown to jsx Versions

1 component(s)
Fixed Versions:
6.11.4
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?
GHSA-ccrp-c664-8p4j is a security vulnerability in Markdown to jsx involving Cross-Site Scripting in markdown-to-jsx under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Markdown to jsx versions are affected?
Affected versions include releases prior to 6.11.4 across affected packages: markdown-to-jsx.
What version fixes GHSA-ccrp-c664-8p4j?
Upgrading to 6.11.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is markdown-to-jsx affected?
Yes, markdown-to-jsx is affected in releases prior to 6.11.4. Upgrade your dependency to 6.11.4 or later.
What CWE is associated with GHSA-ccrp-c664-8p4j?
GHSA-ccrp-c664-8p4j is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (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.).
How can I check npm dependencies for GHSA-ccrp-c664-8p4j?
Run the dependency tree command: 'npm ls markdown-to-jsx'. 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-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
  }
}