CVE-2020-26237
Prototype Pollution in highlight.js
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- Low
- User interaction
- Required
What an attacker can affect
- Confidentiality
- None
- Integrity
- High
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
5.8
Prototype Pollution in highlight.js
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.
- Record
CVE-2020-26237- CVSS 3.1
- 5.8 Medium
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:N - Weakness
- CWE-471
- Updated
- 2026-11-02
EUVDEUVD-2020-1472
5.8
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.
- Record
EUVD-2020-1472- CVSS 3.1
- 5.8 Medium
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:N - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-vfrc-7r7c-w9mx
5.8
Prototype Pollution in highlight.js
Impact
Affected versions of this package 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.
Patches
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.
Workarounds
Patch your library
Manually patch your library to create null objects for both languages and aliases:
const HLJS = function(hljs) {
// ...
var languages = Object.create(null);
var aliases = Object.create(null);
Filter out bad data from end users:
Filter the language names that users are allowed to inject into your HTML to guarantee they are valid.
References
For more information
If you have any questions or comments about this advisory:
- Please file an issue against highlight.js
- Record
GHSA-vfrc-7r7c-w9mx- CVSS 3.1
- 5.8 Medium
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:N - Weakness
- CWE-471
- Updated
- 2026-11-02
NVD
5.8
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.
- Record
CVE-2020-26237- CVSS 3.1
- 5.8 Medium
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:N - CVSS 3.1
- 8.7 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:H/A:H - CVSS 2.0
- 4.9 Medium
AV:N/AC:M/Au:S/C:N/I:P/A:P - Weakness
- CWE-471
- Updated
- 2026-11-02
OSV
8.7
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.
- Record
CVE-2020-26237- CVSS 3.1
- 8.7 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:H/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2020-26237
8.7
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.
- Record
DEBIAN-CVE-2020-26237- CVSS 3.1
- 8.7 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:H/A:H - Updated
- 2026-11-02
Show 4 moreShow less
OSVGHSA-vfrc-7r7c-w9mx
5.8
Prototype Pollution in highlight.js
Impact
Affected versions of this package 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.
Patches
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.
Workarounds
Patch your library
Manually patch your library to create null objects for both languages and aliases:
const HLJS = function(hljs) {
// ...
var languages = Object.create(null);
var aliases = Object.create(null);
Filter out bad data from end users:
Filter the language names that users are allowed to inject into your HTML to guarantee they are valid.
References
For more information
If you have any questions or comments about this advisory:
- Please file an issue against highlight.js
- Record
GHSA-vfrc-7r7c-w9mx- CVSS 3.1
- 5.8 Medium
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:N - Weakness
- CWE-471
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2020-26237
5.8
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.
- Record
UBUNTU-CVE-2020-26237- CVSS 3.1
- 5.8 Medium
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:N - CVSS 3.1
- 8.7 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:H/A:H - Updated
- 2026-11-02
OSVCLSA-2026-1788553382 No score
TuxCare security update for highlight.js (1 CVE)
TuxCare rebuilt highlight.js to address 1 CVE. Fixed in 8.9.1-tuxcare.1.
- Record
CLSA-2026-1788553382- Updated
- 2026-11-02
OSVUSN-8276-1 No score
Highlight.js vulnerability
It was discovered that Highlight.js used plain JavaScript objects for internal language name lookups, making them susceptible to prototype pollution attacks. An attacker could use this to cause a denial of service or unexpected application behaviour.
- Record
USN-8276-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
highlight.jsnpm |
before 9.18.2 | 9.18.2 |
highlight.jsnpm |
10.0.0 up to 10.1.2 | 10.1.2 |
highlight.jsTuxCare:npm |
8.9.1-tuxcare.0 up to 8.9.1-tuxcare.1, plus listed versions 8.9.1 |
8.9.1-tuxcare.1 |
highlight.jsDebian:12 |
before 9.18.1+dfsg1-3 | 9.18.1+dfsg1-3 |
highlight.jsDebian:13 |
before 9.18.1+dfsg1-3 | 9.18.1+dfsg1-3 |
highlight.jsDebian:14 |
before 9.18.1+dfsg1-3 | 9.18.1+dfsg1-3 |
highlight.jsDebian:9 |
before 8.2+ds-5+deb9u1, plus listed versions 8.2+ds-5 |
8.2+ds-5+deb9u1 |
highlight.jsUbuntu:Pro:16.04:LTS |
before 8.2+ds-4ubuntu0.1~esm1, plus listed versions 8.2+ds-4build1 |
8.2+ds-4ubuntu0.1~esm1 |
highlight.jsUbuntu:Pro:18.04:LTS |
before 9.12.0+dfsg1-4ubuntu0.1~esm1, plus listed versions 9.12.0+dfsg1-39.12.0+dfsg1-4 |
9.12.0+dfsg1-4ubuntu0.1~esm1 |
highlight.jsUbuntu:Pro:20.04:LTS |
before 9.12.0+dfsg1-5ubuntu0.1~esm1, plus listed versions 9.12.0+dfsg1-4ubuntu19.12.0+dfsg1-5 |
9.12.0+dfsg1-5ubuntu0.1~esm1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2020-26237 is a medium vulnerability (CVSS 5.8) in Highlightjs Highlight.js, published November 24, 2020. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.33%, the 71st percentile. Fixed in highlight.js 9.18.2.
References
github.com/highlightjs/highlight.js/security/advisories/GHSA-vfrc-7r7c-w9mx
github.com/highlightjs/highlight.js/pull/2636
npmjs.com/package/highlight.js
github.com/highlightjs/highlight.js/commit/7241013ae011a585983e176ddc0489a7a52f6bb0
lists.debian.org/debian-lts-announce/2020/12/msg00041.html
oracle.com/security-alerts/cpujul2022.html