CVE-2020-26237Prototype 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.
What to do
Fixed builds are available from Debian, npm: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | highlight.js | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | highlight.js | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | highlight.js | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | highlight.js | Not affected vulnerable_code_not_present | ||
| Ubuntu 20.04 | highlight.js | Fix pending | 9.12.0+dfsg1-5ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2020-26237 |
| Ubuntu 18.04 | highlight.js | Fix pending | 9.12.0+dfsg1-4ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2020-26237 |
| Ubuntu 16.04 | highlight.js | Fix pending | 8.2+ds-4ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2020-26237 |
| Ubuntu 14.04 | highlight.js | Fix pending | ||
| Debian 14 | highlight.js | Fixed | 9.18.1+dfsg1-3 | DEBIAN-CVE-2020-26237 |
| Debian 13 | highlight.js | Fixed | 9.18.1+dfsg1-3 | DEBIAN-CVE-2020-26237 |
| Debian 12 | highlight.js | Fixed | 9.18.1+dfsg1-3 | DEBIAN-CVE-2020-26237 |
| npm library | highlight.js | Fixed | 10.1.2 | GHSA-vfrc-7r7c-w9mx |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- highlightjs highlight.js: affected: < 9.18.2, >= 10.0.0, < 10.1.2
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
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.