CVE-2020-26237
published medium CVSS 3.1 · 5.8Prototype Pollution in highlight.js
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| highlightjs | — | highlight.js< 9.18.2 · >= 10.0.0, < 10.1.2 | Affected | Not stated | GitHub_M |
| Debian | stretch | highlight.js | Advisory build | 8.2+ds-5+deb9u1 | DLA-2511-1 |
| Ubuntu | bionic | highlight.js | Advisory build | 9.12.0+dfsg1-4ubuntu0.1~esm1 | USN-8276-1 |
| Ubuntu | focal | highlight.js | Advisory build | 9.12.0+dfsg1-5ubuntu0.1~esm1 | USN-8276-1 |
| Ubuntu | xenial | highlight.js | Advisory build | 8.2+ds-4ubuntu0.1~esm1 | USN-8276-1 |
| Ubuntu | bionic | libjs-highlight | Advisory build | 9.12.0+dfsg1-4ubuntu0.1~esm1 | USN-8276-1 |
| Ubuntu | bionic | libjs-highlight.js | Advisory build | 9.12.0+dfsg1-4ubuntu0.1~esm1 | USN-8276-1 |
| Ubuntu | bionic | node-highlight | Advisory build | 9.12.0+dfsg1-4ubuntu0.1~esm1 | USN-8276-1 |
Show 9 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Ubuntu | bionic | node-highlight.js | Advisory build | 9.12.0+dfsg1-4ubuntu0.1~esm1 | USN-8276-1 |
| Ubuntu | focal | libjs-highlight | Advisory build | 9.12.0+dfsg1-5ubuntu0.1~esm1 | USN-8276-1 |
| Ubuntu | focal | libjs-highlight.js | Advisory build | 9.12.0+dfsg1-5ubuntu0.1~esm1 | USN-8276-1 |
| Ubuntu | focal | node-highlight | Advisory build | 9.12.0+dfsg1-5ubuntu0.1~esm1 | USN-8276-1 |
| Ubuntu | focal | node-highlight.js | Advisory build | 9.12.0+dfsg1-5ubuntu0.1~esm1 | USN-8276-1 |
| Ubuntu | xenial | libjs-highlight | Advisory build | 8.2+ds-4ubuntu0.1~esm1 | USN-8276-1 |
| Ubuntu | xenial | libjs-highlight.js | Advisory build | 8.2+ds-4ubuntu0.1~esm1 | USN-8276-1 |
| Ubuntu | xenial | node-highlight | Advisory build | 8.2+ds-4ubuntu0.1~esm1 | USN-8276-1 |
| Ubuntu | xenial | node-highlight.js | Advisory build | 8.2+ds-4ubuntu0.1~esm1 | USN-8276-1 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 5.8 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| highlightjs | highlight.js | < 9.18.2 (affected)>= 10.0.0, < 10.1.2 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-471 CWE-471 Modification of Assumed-Immutable Data (MAID)
References
6- https://github.com/highlightjs/highlight.js/commit/7241013ae011a585983e176ddc0489a7a52f6bb0
- https://github.com/highlightjs/highlight.js/pull/2636
- https://github.com/highlightjs/highlight.js/security/advisories/GHSA-vfrc-7r7c-w9mx
- [debian-lts-announce] 20201230 [SECURITY] [DLA 2511-1] highlight.js security update https://lists.debian.org/debian-lts-announce/2020/12/msg00041.html
- https://www.npmjs.com/package/highlight.js
- https://www.oracle.com/security-alerts/cpujul2022.html
Provider assertions
2GitHub_M · cna
Prototype Pollution in highlight.js
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 2149927f54e2b3916be514c523125cedf7cefe35b113fa75584e3cf2cc86aa22
- Ingested
- 23 Sep 2026, 07:49:46 UTC
- Source record
- Official CVE record