Bug 2123376 (CVE-2022-25887)

Summary: CVE-2022-25887 sanitize-html: insecure global regular expression replacement logic may lead to ReDoS
Product: [Other] Security Response Reporter: Marian Rehak <mrehak>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: adudiak, bcoca, caswilli, chousekn, cmeyers, davidn, dffrench, dhalasz, eclipseo, fjansen, gblomqui, go-sig, gparvin, gzaronik, jburrell, jcammara, jhardy, jobarker, jramanat, jwendell, jwong, kaycoth, kshier, mabashia, mattias.ellert, micjohns, nboldt, ngough, njean, notting, osapryki, ovanders, pahickey, psegedy, rcernich, relrod, rgodfrey, rpetrell, scorneli, sdoran, smcdonal, stcannon, sthirugn, tcarlin, tfister, tkasparek, tkuratom, tsasak, twalsh, vkrizan, vkumar, vmugicag
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: sanitize-html 2.7.1 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in sanitize-html library. Insecure global regular expression replacement logic of HTML comment removal could lead to a regular expression Denial of Service (ReDoS), affecting the availability of the affected component.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-12-03 04:34:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2127948, 2123457, 2123458, 2123459, 2123600    
Bug Blocks: 2123377    

Description Marian Rehak 2022-09-01 13:53:38 UTC
A Regular Expression Denial of Service (ReDoS) due to insecure global regular expression replacement logic of HTML comment removal.

Reference:

https://security.snyk.io/vuln/SNYK-JS-SANITIZEHTML-2957526
https://github.com/apostrophecms/sanitize-html/pull/557
https://github.com/apostrophecms/sanitize-html/commit/b4682c12fd30e12e82fa2d9b766de91d7d2cd23c

Comment 2 Anten Skrabec 2022-09-01 18:03:38 UTC
Created golang-github-apache-beam-2 tracking bugs for this issue:

Affects: fedora-all [bug 2123458]


Created golang-github-prometheus tracking bugs for this issue:

Affects: epel-all [bug 2123457]


Created python-ipyparallel tracking bugs for this issue:

Affects: fedora-all [bug 2123459]

Comment 7 errata-xmlrpc 2022-11-02 14:07:30 UTC
This issue has been addressed in the following products:

  Red Hat Advanced Cluster Management for Kubernetes 2.6 for RHEL 8

Via RHSA-2022:7313 https://access.redhat.com/errata/RHSA-2022:7313

Comment 9 Product Security DevOps Team 2022-12-03 04:34:05 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-2022-25887