MEDIUM
Cross-site Scripting (XSS)
Published Nov 16, 2020
6.5
MEDIUMCVSS 3.1
EPSS 1.36%
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){.">js}'); console.log(reuslt_xss);
Affected products
- Vendor n/a Product Markdown-IT-Highlightjs Defaultn/a
- Version unspecifiedStatusaffectedConstraints<3.3.1
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| n/a | Markdown-IT-Highlightjs | n/a |
|
- < 3.3.1
No data.
No Red Hat product state for this CVE.
markdown-it-highlightjs
npm
Introduced 0 Fixed 3.3.1
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| npm | markdown-it-highlightjs | 0 | 3.3.1 |
Remediation
No remediation recorded yet.
Weaknesses (1)
References (5)
- https://github.com/advisories/GHSA-f246-xrrj-g8j6 Advisory
- https://github.com/valeriangalliat/markdown-it-highlightjs/blob/v3.3.0/index.js%23L52 x_refsource_MISCBroken Link
- https://github.com/valeriangalliat/markdown-it-highlightjs/pull/14 x_refsource_MISCExploitThird Party Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2020-7773
- https://snyk.io/vuln/SNYK-JS-MARKDOWNITHIGHLIGHTJS-1040461 x_refsource_MISCMitigationThird Party Advisory
| Link | Providers | Tags |
|---|---|---|
| https://github.com/advisories/GHSA-f246-xrrj-g8j6 | Advisory | |
| https://github.com/valeriangalliat/markdown-it-highlightjs/blob/v3.3.0/index.js%23L52 | x_refsource_MISCBroken Link | |
| https://github.com/valeriangalliat/markdown-it-highlightjs/pull/14 | x_refsource_MISCExploitThird Party Advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2020-7773 | ||
| https://snyk.io/vuln/SNYK-JS-MARKDOWNITHIGHLIGHTJS-1040461 | x_refsource_MISCMitigationThird Party Advisory |
Change history (0)
No recorded changes yet.
Sources
CVE.org / MITRE
Status PUBLISHED
Assigner snyk
Published Nov 16, 2020
Updated Sep 16, 2024
Reserved Jan 21, 2020
Link CVE-2020-7773
CISA Vulnrichment
GHSA-F246-XRRJ-G8J6 Updated n/a