highlightjs highlight-js CVE-2020-26237 vulnerability in Highlightjs and Other Products
Published on November 24, 2020

Prototype Pollution in highlight.js

product logo product logo product logo
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.

Github Repository NVD

Vulnerability Analysis

CVE-2020-26237 can be exploited with network access, requires user interaction and a small amount of user privileges. This vulnerability is consided to have a high level of attack complexity. The potential impact of an exploit of this vulnerability is considered to have no impact on confidentiality, a high impact on integrity, and no impact on availability.

Attack Vector:
NETWORK
Attack Complexity:
HIGH
Privileges Required:
LOW
User Interaction:
REQUIRED
Scope:
CHANGED
Confidentiality Impact:
NONE
Integrity Impact:
HIGH
Availability Impact:
NONE

Weakness Type

What is a MAID Vulnerability?

The software does not properly protect an assumed-immutable element from being modified by an attacker. This occurs when a particular input is critical enough to the functioning of the application that it should not be modifiable at all, but it is. Certain resources are often assumed to be immutable when they are not, such as hidden form fields in web applications, cookies, and reverse DNS lookups.

CVE-2020-26237 has been classified to as a MAID vulnerability or weakness.


Products Associated with CVE-2020-26237

You can be notified by email with stack.watch whenever vulnerabilities like CVE-2020-26237 are published in these products:

 
 
 

Affected Versions

highlightjs highlight.js:

Vulnerable Packages

The following package name and versions may be associated with CVE-2020-26237

Package Manager Vulnerable Package Versions Fixed In
npm highlight.js < 9.18.2 9.18.2
npm highlight.js >= 10.0.0, < 10.1.2 10.1.2

Exploit Probability

EPSS
0.60%
Percentile
69.09%

EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.