Bug 827353 - (CVE-2012-2660) CVE-2012-2660 rubygem-actionpack: Unsafe query generation
CVE-2012-2660 rubygem-actionpack: Unsafe query generation
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Red Hat Product Security
impact=low,public=20120531,reported=2...
: Security
Depends On: 827364 829510 829511
Blocks: 767033 836071
  Show dependency treegraph
 
Reported: 2012-06-01 04:22 EDT by Jan Lieskovsky
Modified: 2015-07-31 02:51 EDT (History)
13 users (show)

See Also:
Fixed In Version: rubygem-actionpack 3.0.13, rubygem-actionpack 3.1.5, rubygem-actionpack 3.2.4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-26 11:51:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jan Lieskovsky 2012-06-01 04:22:48 EDT
A security flaw was found in the way rubygem-actionpack, the web-flow and rendering framework putting the VC in MVC, performed SQL query generation based on the content of params hash. If a Ruby on Rails application used Rack to parse query parameters, those parameters were not sanitized for the presence of the 'nil' value and that application relied, when performing user authentication, certain params value not to be 'nil', a remote attacker could use this flaw to bypass the authentication, leading to information disclosure and / or unauthorized access to the service.

Upstream advisory announcement:
[1] http://groups.google.com/group/rubyonrails-security/browse_thread/thread/f1203e3376acec0f

Relevant patches:
[2] http://groups.google.com/group/rubyonrails-security/attach/d890f8d58b5fbf32/3-0-null_param.patch?part=3
    (against v3.0 branch)
[3] http://groups.google.com/group/rubyonrails-security/attach/d890f8d58b5fbf32/3-1-null_param.patch?part=5
    (against v3.1 branch)
[4] http://groups.google.com/group/rubyonrails-security/attach/d890f8d58b5fbf32/3-2-null_param.patch?part=4
    (against v3.2 branch)
Comment 1 Jan Lieskovsky 2012-06-01 04:42:41 EDT
Further details how to reproduce the problem (from [1]):
--------------------------------------------------------

For example, a system has password reset with token functionality:

    unless params[:token].nil?
      user = User.find_by_token(params[:token])
      user.reset_password!
    end

An attacker can craft a request such that `params[:token]` will return `[nil]`.  The `[nil]` value will bypass the test for nil, but will still add an "IS NULL" clause to the SQL query.
Comment 2 Jan Lieskovsky 2012-06-01 04:43:57 EDT
This issue affects the versions of the rubygem-actionpack package, as shipped with Fedora release of 15 and 16. Please schedule an update.

--

This issue did NOT affect the version of the rubygem-actionpack package, as shipped with Fedora EPEL 5. The affected functionality is not present there yet.
Comment 3 Jan Lieskovsky 2012-06-01 04:45:11 EDT
Created rubygem-actionpack tracking bugs for this issue

Affects: fedora-all [bug 827364]
Comment 7 Fedora Update System 2012-06-14 20:23:51 EDT
rubygem-actionpack-3.0.11-4.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 8 Fedora Update System 2012-06-14 20:28:59 EDT
rubygem-actionpack-3.0.10-6.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 9 Fedora Update System 2012-06-15 08:33:27 EDT
rubygem-actionpack-3.0.5-8.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 10 errata-xmlrpc 2012-12-04 14:31:14 EST
This issue has been addressed in following products:

  CloudForms for RHEL 6

Via RHSA-2012:1542 https://rhn.redhat.com/errata/RHSA-2012-1542.html
Comment 11 errata-xmlrpc 2013-01-10 15:42:03 EST
This issue has been addressed in following products:

  Red Hat Subscription Asset Manager 1.1

Via RHSA-2013:0154 https://rhn.redhat.com/errata/RHSA-2013-0154.html
Comment 12 errata-xmlrpc 2013-02-28 14:06:31 EST
This issue has been addressed in following products:

  RHEL 6 Version of OpenShift Enterprise

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

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