GHSA-F246-XRRJ-G8J6
Vulnerability from github – Published: 2022-02-10 20:19 – Updated: 2023-09-05 22:52
VLAI
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.
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);
Severity
6.1 (Medium)
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "markdown-it-highlightjs"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.3.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2020-7773"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": true,
"github_reviewed_at": "2021-04-15T21:12:47Z",
"nvd_published_at": "2020-11-16T12:15:00Z",
"severity": "MODERATE"
},
"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(\u0027markdown-it\u0027); \nconst reuslt_xss = md().use(markdownItHighlightjs, { inline: true }).render(\u0027console.log(42){.\"\u003ejs}\u0027); \nconsole.log(reuslt_xss);\n```",
"id": "GHSA-f246-xrrj-g8j6",
"modified": "2023-09-05T22:52:01Z",
"published": "2022-02-10T20:19:47Z",
"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"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
],
"summary": "Cross-site Scripting in markdown-it-highlightjs"
}
Loading…
Loading…
Experimental. This forecast is provided for visualization only and may change without notice. Do not use it for operational decisions.
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…