Prototype Pollution in highlight.js (highlightjs highlight.js)
At a glance
- Source
- NVD
- EPSS
- EPSS 1.33 % · percentile 71 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- GitHub_M
- NVD status
- Modified
Description
Highlight.js is a syntax highlighter written in JavaScript. Highlight.js versions before 9.18.2 and 10.1.2 are vulnerable to Prototype Pollution. A malicious HTML code block can be crafted that will result in prototype pollution of the base object's prototype during highlighting. If you allow users to insert custom HTML code blocks into your page/app via parsing Markdown code blocks (or similar) and do not filter the language names the user can provide you may be vulnerable. The pollution should just be harmless data but this can cause problems for applications not expecting these properties to exist and can result in strange behavior or application crashes, i.e. a potential DOS vector. If your website or application does not render user provided data it should be unaffected. Versions 9.18.2 and 10.1.2 and newer include fixes for this vulnerability. If you are using version 7 or 8 you are encouraged to upgrade to a newer release.
Weaknesses (CWE)
- CWE-471 — Modification of Assumed-Immutable Data (MAID)
References
- https://github.com/highlightjs/highlight.js/security/advisories/GHSA-vfrc-7r7c-w9mx
- https://github.com/highlightjs/highlight.js/pull/2636
- https://www.npmjs.com/package/highlight.js
- https://github.com/highlightjs/highlight.js/commit/7241013ae011a585983e176ddc0489a7a52f6bb0
- https://lists.debian.org/debian-lts-announce/2020/12/msg00041.html
- https://www.oracle.com/security-alerts/cpujul2022.html
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | MEDIUM 5.8 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:N | GitHub_M |
| CVSS 3.1 | MEDIUM 5.8 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:N | NVD · security-advisories@github.com (Secondary) |
| CVSS 3.1 | HIGH 8.7 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:H/A:H | NVD · nvd@nist.gov (Primary) |
| CVSS 2.0 | MEDIUM 4.9 | AV:N/AC:M/Au:S/C:N/I:P/A:P | NVD · nvd@nist.gov (Primary) |
Advisories
- GHSA-vfrc-7r7c-w9mx — Prototype Pollution in highlight.js
European references
- ENISA EUVD · EUVD-2020-1472
- GCVE · GCVE-0-2020-26237
CERT-FR advisories
- CERTFR-2022-AVI-655 — Multiples vulnérabilités dans Oracle MySQL · cert.ssi.gouv.fr
Affected configurations (NVD CPE)
cpe:2.3:a:highlightjs:highlight.js:*:*:*:*:*:node.js:*:*< 9.18.2cpe:2.3:a:highlightjs:highlight.js:*:*:*:*:*:node.js:*:*≥ 10.1.0 < 10.1.2cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*cpe:2.3:a:oracle:mysql_enterprise_monitor:*:*:*:*:*:*:*:*≤ 8.0.30
Affected products
| Product | Versions |
|---|---|
| highlightjs · highlight.js | affected < 9.18.2 ; affected >= 10.0.0, < 10.1.2 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| CERT-FR (ANSSI) | Licence Ouverte / Etalab 2.0 |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |