Vulnerabilities in pkg:npm/marky-markdown

PACKAGE
Advisory Summary

GHSA-pxmp-fwjc-4x7q is a MODERATE html injection vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Marky markdown libraries in the npm ecosystem. The issue involves html injection in marky-markdown. Remediation is available in the latest vendor maintenance releases.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/marky-markdown

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/marky-markdown. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-pxmp-fwjc-4x7q - MODERATE HTML Injection in marky-markdown
GHSA-mg69-6j3m-jvgw - HIGH HTML Injection in marky-markdown

GHSA-pxmp-fwjc-4x7q at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-pxmp-fwjc-4x7q
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Marky markdown
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-pxmp-fwjc-4x7q

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

marky-markdown fixed: Latest secure release
npm install marky-markdown@Latest secure release
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 marky-markdown

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-pxmp-fwjc-4x7q, inspect your project dependencies using npm:

npm ls marky-markdown

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

Note: The npm ls marky-markdown 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 Marky markdown, 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

All versions of `marky-markdown` are vulnerable to HTML Injection due to a validation bypass. The package only allows iframes where the source is `youtube.com` but it is possible to bypass the validation with sources where `youtube.com` is the sub-domain, such as `youtube.com.evil.co`. This ## Recommendation This package is no longer maintained. Please upgrade to `@npmcorp/marky-markdown`

GHSA-pxmp-fwjc-4x7q Affected Marky markdown Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
marky-markdown
npm
≥ 0.0.0

References

Frequently Asked Questions

What is GHSA-pxmp-fwjc-4x7q?
GHSA-pxmp-fwjc-4x7q is a security vulnerability in Marky markdown involving HTML Injection in marky-markdown under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Marky markdown versions are affected?
Affected versions include releases prior to current release patches across affected packages: marky-markdown.
What version fixes GHSA-pxmp-fwjc-4x7q?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is marky-markdown affected?
Yes, marky-markdown is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with GHSA-pxmp-fwjc-4x7q?
GHSA-pxmp-fwjc-4x7q 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-pxmp-fwjc-4x7q?
Run the dependency tree command: 'npm ls marky-markdown'. 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-pxmp-fwjc-4x7q",
  "modified" : "2021-10-04T20:56:09Z",
  "published" : "2020-09-03T15:45:23Z",
  "aliases" : [ ],
  "summary" : "HTML Injection in marky-markdown",
  "details" : "All versions of `marky-markdown` are vulnerable to HTML Injection due to a validation bypass. The package only allows iframes where the source is `youtube.com` but it is possible to bypass the validation with sources where `youtube.com` is the sub-domain, such as `youtube.com.evil.co`. This \n\n\n## Recommendation\n\nThis package is no longer maintained. Please upgrade to `@npmcorp/marky-markdown`",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "marky-markdown"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "PACKAGE",
    "url" : "https://github.com/npm/marky-markdown"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1471"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-08-31T19:00:30Z",
    "nvd_published_at" : null
  }
}