GHSA-mg69-6j3m-jvgw: Marky markdown HTML Injection Vulnerability

HIGH
CVSS 7.3
CWE-79
Published
Advisory Summary

GHSA-mg69-6j3m-jvgw is a HIGH (CVSS 7.3) 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.

GHSA-mg69-6j3m-jvgw at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-mg69-6j3m-jvgw
Severity HIGH
CVSS v3.1 Base Score 7.3
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

Security Impact

CVSS: 7.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:L/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix GHSA-mg69-6j3m-jvgw

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-mg69-6j3m-jvgw, 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. The package fails to sanitize `style` attributes in `img` tags of the markdown input. This may allow attackers to affect the size of images in the rendered HTML. ## Recommendation This package is no longer maintained. Please upgrade to `@npmcorp/marky-markdown`

GHSA-mg69-6j3m-jvgw 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-mg69-6j3m-jvgw?
GHSA-mg69-6j3m-jvgw 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-mg69-6j3m-jvgw?
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 is the CVSS score of GHSA-mg69-6j3m-jvgw?
GHSA-mg69-6j3m-jvgw has a CVSS v3.1 base score of 7.3 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with GHSA-mg69-6j3m-jvgw?
GHSA-mg69-6j3m-jvgw 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-mg69-6j3m-jvgw?
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-mg69-6j3m-jvgw",
  "modified" : "2021-10-04T20:55:27Z",
  "published" : "2020-09-03T15:45:08Z",
  "aliases" : [ ],
  "summary" : "HTML Injection in marky-markdown",
  "details" : "All versions of `marky-markdown` are vulnerable to HTML Injection. The package fails to sanitize `style` attributes in `img` tags of the markdown input. This may allow attackers to affect the size of images in the rendered HTML.\n\n\n## Recommendation\n\nThis package is no longer maintained. Please upgrade to `@npmcorp/marky-markdown`",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L"
  } ],
  "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://snyk.io/vuln/SNYK-JS-MARKYMARKDOWN-548871"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1470"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-08-31T19:00:28Z",
    "nvd_published_at" : null
  }
}