CVE-2020-7773 json
Cross-site Scripting (XSS)
published 5y ago modified 4mo ago also GHSA-f246-xrrj-g8j6 , EUVD-2022-0966
- cvss
- 6.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.4%
- EPSS 1.4% chance of exploitation in 30 days, percentile 71%
- public exploits
- 0
- none known
Summary
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);
Patch / fix
- npm markdown-it-highlightjs 3.3.1
- n/a markdown-it-highlightjs 3.3.1
Is CVE-2020-7773 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerExploit prediction
1.36% chance of exploitation in the next 30 days, higher than 71% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- github.com https://github.com/valeriangalliat/markdown-it-highlightjs/pull/14 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.5 | 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 |
| CNA | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
| NVD | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 2.0 | 4.3 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
| GitHub | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | markdown-it-highlightjs | <3.3.1 |
3.3.1 |
Affected products
- n/a markdown-it-highlightjs
Classification
- Weakness
-
- CWE-79 Improper Neutralization of Input During Web Page Generation
References
-
github.com
/valeriangalliat/markdown-it-highlightjs/pull/14
web, exploit, third-party-advisory
-
snyk.io
/vuln/SNYK-JS-MARKDOWNITHIGHLIGHTJS-1040461
web, mitigation, third-party-advisory
-
github.com
/valeriangalliat/markdown-it-highlightjs/blob/v3.3.0/index.js%23L52
web, broken-link
-
nvd.nist.gov
/vuln/detail/CVE-2020-7773
advisory
Sources
- CVE List CVE-2020-7773
- GitHub Advisory GHSA-f246-xrrj-g8j6
- NVD CVE-2020-7773
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.