Skip to content

CVE-2020-26237 Prototype Pollution in highlight.js

HighCVSS 8.7 EPSS 1.3%
Published
Updated
Exploit status
No public exploit known
Technology
MySQLUbuntuDebian

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.

Upgrade path

10 packages: 9 fixed.

PackageAffectedFixed inStatus
debian/highlight.js(Debian 12) < 9.18.1+dfsg1-3 9.18.1+dfsg1-3 Fixed
debian/highlight.js(Debian 13) < 9.18.1+dfsg1-3 9.18.1+dfsg1-3 Fixed
debian/highlight.js(Debian 14) < 9.18.1+dfsg1-3 9.18.1+dfsg1-3 Fixed
highlightjs highlight.js < 9.18.2; = < 9.18.2; = >= 10.0.0, < 10.1.2; >= 10.1.0, < 10.1.2 9.18.2, 10.1.2 Fixed
npm highlight.js(npm) < 9.18.2; >= 10.0.0, < 10.1.2 9.18.2, 10.1.2 Fixed
oracle mysql enterprise monitor <= 8.0.30 after 8.0.30 Fixed
ubuntu/highlight.js(Ubuntu Pro 16.04) < 8.2+ds-4ubuntu0.1~esm1; = 8.2+ds-4build1 8.2+ds-4ubuntu0.1~esm1 Fixed
ubuntu/highlight.js(Ubuntu Pro 18.04) < 9.12.0+dfsg1-4ubuntu0.1~esm1; = 9.12.0+dfsg1-3; = 9.12.0+dfsg1-4 9.12.0+dfsg1-4ubuntu0.1~esm1 Fixed
ubuntu/highlight.js(Ubuntu Pro 20.04) < 9.12.0+dfsg1-5ubuntu0.1~esm1; = 9.12.0+dfsg1-4ubuntu1; = 9.12.0+dfsg1-5 9.12.0+dfsg1-5ubuntu0.1~esm1 Fixed
debian linux = 9.0 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
npm highlight.js(npm) < 9.18.2 9.18.2
npm highlight.js(npm) >= 10.0.0, < 10.1.2 10.1.2
debian/highlight.js(Debian:12) < 9.18.1+dfsg1-3 9.18.1+dfsg1-3
debian/highlight.js(Debian:13) < 9.18.1+dfsg1-3 9.18.1+dfsg1-3
debian/highlight.js(Debian:14) < 9.18.1+dfsg1-3 9.18.1+dfsg1-3
highlightjs highlight.js < 9.18.2 9.18.2
highlightjs highlight.js >= 10.1.0, < 10.1.2 10.1.2
debian linux = 9.0 No fix listed
oracle mysql enterprise monitor <= 8.0.30 No fix listed
highlightjs highlight.js = < 9.18.2 No fix listed
highlightjs highlight.js = >= 10.0.0, < 10.1.2 No fix listed
ubuntu/highlight.js(Ubuntu:Pro:16.04) < 8.2+ds-4ubuntu0.1~esm1 8.2+ds-4ubuntu0.1~esm1
ubuntu/highlight.js(Ubuntu:Pro:16.04) = 8.2+ds-4build1 No fix listed
ubuntu/highlight.js(Ubuntu:Pro:18.04) < 9.12.0+dfsg1-4ubuntu0.1~esm1 9.12.0+dfsg1-4ubuntu0.1~esm1
ubuntu/highlight.js(Ubuntu:Pro:18.04) = 9.12.0+dfsg1-3 No fix listed
ubuntu/highlight.js(Ubuntu:Pro:18.04) = 9.12.0+dfsg1-4 No fix listed
ubuntu/highlight.js(Ubuntu:Pro:20.04) < 9.12.0+dfsg1-5ubuntu0.1~esm1 9.12.0+dfsg1-5ubuntu0.1~esm1
ubuntu/highlight.js(Ubuntu:Pro:20.04) = 9.12.0+dfsg1-4ubuntu1 No fix listed
ubuntu/highlight.js(Ubuntu:Pro:20.04) = 9.12.0+dfsg1-5 No fix listed

References