CVEfocus › CVE database › CVE-2020-26237

CVE-2020-26237Prototype Pollution in highlight.js

CVSS 5.8 MediumEPSS 1.3% (higher than 71% of CVEs)Published 2020-11-24Updated 2024-08-04Assigner: GitHub_M

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.

CWE-471

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

4Fixed
4Fix pending
4Not affected

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04highlight.jsNot affected
vulnerable_code_not_present
Ubuntu 25.10highlight.jsNot affected
vulnerable_code_not_present
Ubuntu 24.04highlight.jsNot affected
vulnerable_code_not_present
Ubuntu 22.04highlight.jsNot affected
vulnerable_code_not_present
Ubuntu 20.04highlight.jsFix pending9.12.0+dfsg1-5ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2020-26237
Ubuntu 18.04highlight.jsFix pending9.12.0+dfsg1-4ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2020-26237
Ubuntu 16.04highlight.jsFix pending8.2+ds-4ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2020-26237
Ubuntu 14.04highlight.jsFix pending
Debian 14highlight.jsFixed9.18.1+dfsg1-3DEBIAN-CVE-2020-26237
Debian 13highlight.jsFixed9.18.1+dfsg1-3DEBIAN-CVE-2020-26237
Debian 12highlight.jsFixed9.18.1+dfsg1-3DEBIAN-CVE-2020-26237
npm libraryhighlight.jsFixed10.1.2GHSA-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.

References

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.