{"id":"GHSA-f246-xrrj-g8j6","revision":"134105f6f2c94fb4b98bb12f719ba317","records":[{"revision":"134105f6f2c94fb4b98bb12f719ba317","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-f246-xrrj-g8j6","aliases":["CVE-2020-7773","SNYK-JS-MARKDOWNITHIGHLIGHTJS-1040461"],"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){.\">js}'); \nconsole.log(reuslt_xss);\n```","state":0,"publishedAt":"2022-02-10T20:19:47+00:00","modifiedAt":"2026-07-08T06:49:30.4321735+00:00","affected":[{"ecosystem":"npm","name":"markdown-it-highlightjs","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"3.3.1"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://nvd.nist.gov/vuln/detail/CVE-2020-7773","https://github.com/valeriangalliat/markdown-it-highlightjs/pull/14","https://github.com/valeriangalliat/markdown-it-highlightjs/blob/v3.3.0/index.js%23L52","https://snyk.io/vuln/SNYK-JS-MARKDOWNITHIGHLIGHTJS-1040461"],"sourceUrl":"https://github.com/advisories/GHSA-f246-xrrj-g8j6","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-f246-xrrj-g8j6","identifiers":["GHSA-f246-xrrj-g8j6","CVE-2020-7773","SNYK-JS-MARKDOWNITHIGHLIGHTJS-1040461"]},"retained":false,"historicalAffected":[]}],"coverage":[]}