CVE-2020-7773:
Cross-site Scripting in markdown-it-highlightjs
6.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.57941%
CWE
Published
2/10/2022
Updated
9/5/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
markdown-it-highlightjs | npm | < 3.3.1 | 3.3.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability exists in the inline code rendering logic where user-controlled lang parameters were insufficiently sanitized. The patch modifies the regex in inlineCodeRenderer
to exclude dangerous characters, proving this was the injection point. This function
directly processes the vulnerable lang attribute from markdown input and would appear in stack traces when processing malicious payloads.