Bug 1901662 (CVE-2020-26237) - CVE-2020-26237 nodejs-highlight-js: prototype pollution via a crafted HTML code block
Summary: CVE-2020-26237 nodejs-highlight-js: prototype pollution via a crafted HTML co...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2020-26237
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1901664 1901663
Blocks: 1901666
TreeView+ depends on / blocked
 
Reported: 2020-11-25 18:36 UTC by Guilherme de Almeida Suckevicz
Modified: 2023-02-01 23:00 UTC (History)
8 users (show)

Fixed In Version: highlight.js 9.18.2, highlight.js 10.1.2
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in nodejs-highlight-js. Highlight.js is 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.
Clone Of:
Environment:
Last Closed: 2021-10-19 14:08:19 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:3917 0 None None None 2021-10-19 12:10:26 UTC

Description Guilherme de Almeida Suckevicz 2020-11-25 18:36:00 UTC
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.

Reference:
https://github.com/highlightjs/highlight.js/security/advisories/GHSA-vfrc-7r7c-w9mx

Upstream patches:
https://github.com/highlightjs/highlight.js/pull/2636
https://github.com/highlightjs/highlight.js/commit/7241013ae011a585983e176ddc0489a7a52f6bb0

Comment 1 Guilherme de Almeida Suckevicz 2020-11-25 18:36:22 UTC
Created nodejs-highlight-js tracking bugs for this issue:

Affects: epel-all [bug 1901664]
Affects: fedora-all [bug 1901663]

Comment 4 Stoyan Nikolov 2020-12-18 11:06:36 UTC
Statement:

In Red Hat Virtualization, ovirt-engine-api-explorer uses a vulnerable version of highlight.js, however since release 4.4.3 ovirt-engine-api-explorer is obsoleted and no longer used.

Comment 6 errata-xmlrpc 2021-10-19 12:10:24 UTC
This issue has been addressed in the following products:

  Red Hat Quay 3

Via RHSA-2021:3917 https://access.redhat.com/errata/RHSA-2021:3917

Comment 7 Product Security DevOps Team 2021-10-19 14:08:19 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2020-26237


Note You need to log in before you can comment on or make changes to this bug.