{"id":"CVE-2020-7773","published":"2020-11-16T12:00:24Z","modified":"2024-09-16T22:09:13Z","title":"Cross-site Scripting (XSS)","vendor":null,"product":null,"tier":"tail","description":{"text":"This affects the package markdown-it-highlightjs before 3.3.1. It is possible insert malicious JavaScript as a value of lang in the markdown-it-highlightjs Inline code highlighting feature. const markdownItHighlightjs = require(\"markdown-it-highlightjs\"); const md = require('markdown-it'); const reuslt_xss = md() .use(markdownItHighlightjs, { inline: true }) .render('console.log(42){.\">js}'); console.log(reuslt_xss);","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N/E:P/RL:O/RC:C","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01362,"percentile":0.72445,"provenance":"source"},"cwes":[],"references":[{"url":"https://snyk.io/vuln/SNYK-JS-MARKDOWNITHIGHLIGHTJS-1040461","tags":["x_refsource_MISC"]},{"url":"https://github.com/valeriangalliat/markdown-it-highlightjs/pull/14","tags":["x_refsource_MISC"]},{"url":"https://github.com/valeriangalliat/markdown-it-highlightjs/blob/v3.3.0/index.js%23L52","tags":["x_refsource_MISC"]}],"priority":{"score":19.0,"factors":[{"name":"EPSS percentile","points":14.49},{"name":"CVSS severity","points":4.55}]},"affectedVersions":[{"vendor":"n/a","product":"markdown-it-highlightjs","versions":[">= unspecified, < 3.3.1"]}],"affected":[{"ecosystem":"npm","package":"markdown-it-highlightjs","vulnerableRanges":["<3.3.1"],"patched":["3.3.1"],"from":["GHSA-f246-xrrj-g8j6"],"provenance":"source"}],"summary":{"text":"The markdown-it-highlightjs npm package, prior to version 3.3.1, has a cross-site scripting flaw in its inline code highlighting feature, where the lang value is not sanitised and malicious JavaScript can be injected through it. An attacker who can supply Markdown input to a page rendering it with inline highlighting enabled needs no authentication or network privileges, but exploitation requires a victim user to interact with the crafted content.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:33:57Z"},"euvd":{"id":"EUVD-2022-0966","exploited":false,"provenance":"source"}}