Bug 1961382 (CVE-2021-22902)

Summary: CVE-2021-22902 rails: Possible Denial of Service vulnerability in Action Dispatch
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: akarol, bbuckingham, bcourt, bkearney, btotty, dmetzger, gmccullo, gtanzill, hhudgeon, jhardy, lzap, mmccune, mo, mtasaka, nmoumoul, obarenbo, osoukup, pcreech, pvalena, rchan, rjerrido, roliveri, ruby-packagers-sig, simaishi, smallamp, sokeeffe, sseago, s, strzibny, tdawson, vondruch
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: actionpack-, actionpack- Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in RubyGem Actionpack which is framework for handling and responding to web requests in Rails. A possible Denial of Service vulnerability was found in the Mime type parser of Action Dispatch.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-13 15:49:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1961383, 1961738    
Bug Blocks: 1961384    

Description Pedro Sampaio 2021-05-17 19:20:28 UTC
There is a possible Denial of Service vulnerability in the Mime type parser
Action Dispatch. This vulnerability has been assigned the CVE identifier

Versions Affected:  >= 6.0.0
Not affected:       < 6.0.0
Fixed Versions:,

There is a possible Denial of Service vulnerability in Action Dispatch.
Carefully crafted Accept headers can cause the mime type parser in Action
Dispatch to do catastrophic backtracking in the regular expression engine.

The fixed releases are available at the normal locations.

The following monkey patch placed in an initializer can be used to work
the issue:

module Mime
  class Type

To aid users who aren't able to upgrade immediately we have provided
patches for
the two supported release series. They are in git-am format and consist of a
single changeset.

* 6-0-Prevent-catastrophic-backtracking-during-mime-parsin.patch - Patch
for 6.0 series
* 6-1-Prevent-catastrophic-backtracking-during-mime-parsin.patch - Patch
for 6.1 series

Please note that only the 6.1.Z, 6.0.Z, and 5.2.Z series are supported at
present. Users of earlier unsupported releases are advised to upgrade as
as possible as we cannot guarantee the continued availability of security
fixes for unsupported releases.


Thanks to Security Curious <security-curious> for reporting this!

Aaron Patterson

Comment 1 Pedro Sampaio 2021-05-17 19:21:01 UTC
Created rubygem-rails tracking bugs for this issue:

Affects: fedora-all [bug 1961383]

Comment 2 Yadnyawalk Tale 2021-05-18 15:54:49 UTC
Sat 6.8 and 6.9 tracker: https://bugzilla.redhat.com/show_bug.cgi?id=1961738

Comment 4 errata-xmlrpc 2021-11-16 14:08:12 UTC
This issue has been addressed in the following products:

  Red Hat Satellite 6.10 for RHEL 7

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