Bug 1500700 (CVE-2017-16138)

Summary: CVE-2017-16138 nodejs-mime: Regular expression Denial of Service
Product: [Other] Security Response Reporter: Andrej Nemec <anemec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bdettelb, bleanhar, ccoleman, dblechte, dedgar, dfediuck, dffrench, dmcphers, drusso, eedri, hhorak, jgoulding, jkeck, jmadigan, jorton, jshepherd, kpiwko, kseifried, lgriffin, mgoldboi, michal.skrivanek, ngough, nodejs-sig, omachace, pbraun, pebarbos, pwright, rrajasek, sbonazzo, sgratch, sherold, tchollingsworth, tjay, tomckay, trepel, yturgema, zsvetlik
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: nodejs-mime 2.0.3 Doc Type: If docs needed, set a value
Doc Text:
The mime module is vulnerable to regular expression denial of service when a mime lookup is performed on untrusted user input.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-27 01:44:17 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: 1500701, 1500702, 1501997, 1501998, 1516749, 1516750    
Bug Blocks: 1500708    

Description Andrej Nemec 2017-10-11 11:04:59 UTC
The mime module is vulnerable to regular expression denial of service when a mime lookup is performed on untrusted user input.

Upstream issue:

https://github.com/broofa/node-mime/issues/167

Upstream patches:

https://github.com/broofa/node-mime/commit/855d0c4b8b22e4a80b9401a81f2872058eae274d
https://github.com/broofa/node-mime/commit/1df903fdeb9ae7eaa048795b8d580ce2c98f40b0

Comment 1 Andrej Nemec 2017-10-11 11:05:28 UTC
Created nodejs-mime tracking bugs for this issue:

Affects: epel-all [bug 1500701]
Affects: fedora-all [bug 1500702]

Comment 2 Pedro Yóssis Silva Barbosa 2017-10-13 16:38:18 UTC
External References:

https://nodesecurity.io/advisories/535

Comment 6 Pedro Yóssis Silva Barbosa 2017-10-18 15:14:56 UTC
This issue affects the versions of rh-nodejs4-nodejs-mime as shipped with Red Hat Enterprise Linux 6 and 7. Red Hat Product Security has rated this issue as having Moderate security impact. A future update may address this issue. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

Comment 8 Mark Knowles 2017-11-23 11:02:21 UTC
Created nodejs-mime tracking bugs for this issue:

Affects: openshift-1 [bug 1516749]

Comment 10 Jason Shepherd 2018-01-12 06:49:17 UTC
The vulnerable function call, mime.lookup, is not used in any RHMAP services. Marking it as not affected.

Comment 12 Jason Shepherd 2021-05-07 02:47:55 UTC
Statement:

Red Hat Virtualization 4.2 EUS contained a vulnerable version of nodejs-mime in the ovirt-engine-dashboard package. This package has been removed in Red Hat Virtualization 4.2.

Red Hat Quay includes mime as a dependency of Karma. It's only used at build time, not runtime so this vulnerability has a low impact of Red Hat Quay.

Comment 14 errata-xmlrpc 2021-10-19 12:09:58 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