GHSA-mg69-6j3m-jvgw: Marky markdown HTML Injection Vulnerability
HIGHGHSA-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
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).
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.
npm install marky-markdown@Latest secure release
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
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?
Which Marky markdown versions are affected?
What version fixes GHSA-mg69-6j3m-jvgw?
Is marky-markdown affected?
What is the CVSS score of GHSA-mg69-6j3m-jvgw?
What CWE is associated with GHSA-mg69-6j3m-jvgw?
How can I check npm dependencies for GHSA-mg69-6j3m-jvgw?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}