Bug 1036409 (CVE-2013-6417)

Summary: CVE-2013-6417 rubygem-actionpack: unsafe query generation risk (incomplete fix for CVE-2013- 0155)
Product: [Other] Security Response Reporter: Kurt Seifried <kseifried>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: aortega, apevec, athomas, ayoung, bdunne, bgollahe, bkearney, bleanhar, ccoleman, chrisw, cpelland, cwolfe, dajohnso, dmcphers, drieden, gkotton, hhorak, iheim, jdetiber, jfrey, jialiu, jorton, jrafanie, jrusnack, kseifried, lhh, lmeyer, markmc, mmaslano, mmccune, mmcgrath, nobody+bgollahe, obarenbo, rbryant, ruby-maint, sclewis, security-response-team, tdawson, vondruch, xlecauch, yeylon
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rubygem-actionpack 3.2.16, rubygem-actionpack 4.0.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-04 15:48: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: 1036412, 1036413, 1036414, 1036415, 1036416, 1036417, 1036418, 1036419, 1036420, 1036421, 1037487, 1159433    
Bug Blocks: 1036411, 1095075, 1239193    
Attachments:
Description Flags
CVE-2013-6417-3-2-rack-params.patch
none
CVE-2013-6417-4-0-rack-params.patch none

Description Kurt Seifried 2013-12-01 22:30:50 UTC
Michael Koziarski reports:

Incomplete fix to CVE-2013-0155 (Unsafe Query Generation Risk)

The prior fix to CVE-2013-0155 was incomplete and the use of common 3rd party libraries can accidentally circumvent the protection. This vulnerability has been assigned the CVE identifier CVE-2013-6417.

Versions Affected:  All.
Not affected:       None
Fixed Versions:     4.0.2 & 3.2.16

Impact 
------
Due to the way that Rack::Request and Rails::Request interact, it is possible for a 3rd party or custom rack middleware to parse the parameters insecurely and store them in the same key that Rails uses for its own parameters.  In the event that happens the application will receive unsafe parameters and could be vulnerable to the earlier vulnerability.

All users running an affected release should either upgrade or use one of the work arounds immediately. 

Releases 
-------- 
The 4.0.2 & 3.2.16 releases are available at the normal locations. 

Workarounds 
-----------
To work around this issue you need to audit your middleware chain and ensure that each of the libraries in use does not create an instance of Rack::Request. 

Patches 
------- 
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. 

* 4-0-rack-params.patch - Patch for 4.0 series 
* 3-2-rack-params.patch - Patch for 3.2 series 

Please note that only the 4.0.x and 3.2.x series are supported at present.  Users of earlier unsupported releases are advised to upgrade as soon as possible as we cannot guarantee the continued availability of security fixes for unsupported releases.

Credits 
------- 
Thanks to Sudhir Rao for reporting the issue to us and to James Tucker for assisting with the fix.

Comment 2 Kurt Seifried 2013-12-01 22:39:26 UTC
Created attachment 831320 [details]
CVE-2013-6417-3-2-rack-params.patch

Comment 3 Kurt Seifried 2013-12-01 22:39:57 UTC
Created attachment 831321 [details]
CVE-2013-6417-4-0-rack-params.patch

Comment 11 Tomas Hoger 2013-12-02 20:24:02 UTC
CVE-2013-0155 was tracked via bug 892866.

Comment 13 errata-xmlrpc 2013-12-05 22:01:16 UTC
This issue has been addressed in following products:

  Red Hat Software Collections for RHEL-6

Via RHSA-2013:1794 https://rhn.redhat.com/errata/RHSA-2013-1794.html

Comment 14 errata-xmlrpc 2014-01-06 18:04:14 UTC
This issue has been addressed in following products:

  OpenStack 3 for RHEL 6

Via RHSA-2014:0008 https://rhn.redhat.com/errata/RHSA-2014-0008.html

Comment 15 Kurt Seifried 2014-05-08 06:53:14 UTC
Acknowledgment:

Red Hat would like to thank the Ruby on Rails project for reporting this issue. The Ruby on Rails project acknowledges Sudhir Rao as the original reporter.

Comment 16 errata-xmlrpc 2014-05-12 18:12:58 UTC
This issue has been addressed in following products:

  CloudForms Management Engine 5.x

Via RHSA-2014:0469 https://rhn.redhat.com/errata/RHSA-2014-0469.html