CVE-2020-26237 json
Prototype Pollution in highlight.js
published 5y ago modified 4mo ago also GHSA-vfrc-7r7c-w9mx , EUVD-2020-1472
- cvss
- 5.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.3%
- EPSS 1.3% chance of exploitation in 30 days, percentile 71%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm highlight.js 9.18.2, 10.1.2
- highlightjs highlight.js 9.18.2, 10.1.2
- highlight.js Debian 14, Debian 13, Debian 12 9.18.1+dfsg1-3
debian advisories DEBIAN-CVE-2020-26237
- highlight.js Ubuntu Pro 16.04 LTS 8.2+ds-4ubuntu0.1~esm1
- highlight.js Ubuntu Pro 18.04 LTS 9.12.0+dfsg1-4ubuntu0.1~esm1
- highlight.js Ubuntu Pro 20.04 LTS 9.12.0+dfsg1-5ubuntu0.1~esm1
ubuntu advisories UBUNTU-CVE-2020-26237
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- github.com/highlightjs/highlight.js@7241013 commit
- github.com/highlightjs/highlight.js#2636 pull request
Is CVE-2020-26237 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2020-26237 updated cvss 5.8
nodejs-highlight-js: prototype pollution via a crafted HTML code block
-
Red Hat Quay v3 quay/quay-rhel8 v3.6.0-62fixed: vendor fix RHSA-2021:3917
-
Red Hat Logging Subsystem for Red Hat OpenShift openshift-logging/kibana6-rhel8 Red Hat Quay v3 quay/clair-rhel8 v3.6.0-70, quay/quay-builder-rhel8 v3.6.0-44, quay/quay-operator-rhel8 v3.6.0-43, quay/quay-operator-bundle v3.6.0-48, quay/quay-bridge-operator-rhel8 v3.6.0-40, quay/quay-bridge-operator-bundle v3.6.0-35, +3 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.33% chance of exploitation in the next 30 days, higher than 71% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.8 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:N |
| NVD | 3.1 | 8.7 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:H/A:H |
| NVD | 2.0 | 4.9 | AV:N/AC:M/Au:S/C:N/I:P/A:P |
| GitHub | 3.1 | 5.8 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | highlight.js | <9.18.2 >=10.0.0, <10.1.2 |
9.18.2 10.1.2 |
Affected products
- highlightjs highlight.js
Classification
- Weakness
-
- CWE-471 Modification of Assumed-Immutable Data (MAID)
References
-
github.com
/highlightjs/highlight.js/pull/2636
web, patch, third-party-advisory
-
github.com
/highlightjs/highlight.js/commit/7241013ae011a585983e176ddc0489a7a52f6bb0
web, patch, third-party-advisory
-
github.com
/highlightjs/highlight.js/security/advisories/GHSA-vfrc-7r7c-w9mx
web, mitigation, third-party-advisory
-
npmjs.com
/package/highlight.js
web, third-party-advisory
-
lists.debian.org
/debian-lts-announce/2020/12/msg00041.html
mailing-list, web, third-party-advisory
-
oracle.com
/security-alerts/cpujul2022.html
web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2020-26237
advisory
-
github.com
/highlightjs/highlight.js
package
Sources
- CVE List CVE-2020-26237
- GitHub Advisory GHSA-vfrc-7r7c-w9mx
- NVD CVE-2020-26237
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.