CVE-2020-26237 Prototype Pollution in highlight.js

Medium 5.8 Published Updated

Prototype pollution in highlight.js allows attackers to cause denial of service via malicious HTML code blocks if user input is rendered.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2020-26237?

CVE-2020-26237 is a medium-severity vulnerability in Debian Debian Linux, published on 24 Nov 2020. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-471

Which versions are affected by CVE-2020-26237?

4 open source packages ship an affected version, including highlight.js. It affects 3 products.

PackageAffectedFixed in
highlight.js npmAll versions9.18.2
highlight.js npmAll versions9.18.2
highlight.js npmFrom 10.0.010.1.2
highlight.js npmFrom 10.0.010.1.2

Products include Debian Debian Linux, Highlightjs Highlight.js, Oracle Mysql Enterprise Monitor.

How do I fix CVE-2020-26237?

Upgrade highlight.js to a fixed version for your release line: 9.18.2 or 10.1.2.

Is CVE-2020-26237 being exploited?

There is no known exploitation of CVE-2020-26237 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as CLSA-2026-1788553382, DEBIAN-CVE-2020-26237, DLA-2511-1, GHSA-vfrc-7r7c-w9mx, UBUNTU-CVE-2020-26237, USN-8276-1.

Is CVE-2020-26237 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free