Vulnerability Details : CVE-2020-7773
Potential exploit
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);
Vulnerability category: Cross site scripting (XSS)
Products affected by CVE-2020-7773
- cpe:2.3:a:markdown-it-highlightjs_project:markdown-it-highlightjs:*:*:*:*:*:node.js:*:*
Exploit prediction scoring system (EPSS) score for CVE-2020-7773
0.17%
Probability of exploitation activity in the next 30 days
EPSS Score History
~ 54 %
Percentile, the proportion of vulnerabilities that are scored at or less
CVSS scores for CVE-2020-7773
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source | First Seen |
---|---|---|---|---|---|---|
4.3
|
MEDIUM | AV:N/AC:M/Au:N/C:N/I:P/A:N |
8.6
|
2.9
|
NIST | |
6.1
|
MEDIUM | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
2.8
|
2.7
|
NIST | |
6.5
|
MEDIUM | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
2.8
|
3.6
|
Snyk |
CWE ids for CVE-2020-7773
-
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.Assigned by: nvd@nist.gov (Primary)
References for CVE-2020-7773
-
https://snyk.io/vuln/SNYK-JS-MARKDOWNITHIGHLIGHTJS-1040461
SnykMitigation;Third Party Advisory
-
https://github.com/valeriangalliat/markdown-it-highlightjs/pull/14
fix: escape invalid lang characters (XSS) by ooooooo-q · Pull Request #14 · valeriangalliat/markdown-it-highlightjs · GitHubExploit;Third Party Advisory
-
https://github.com/valeriangalliat/markdown-it-highlightjs/blob/v3.3.0/index.js%23L52
Page not found · GitHub · GitHubBroken Link
Jump to