Bug 827353 (CVE-2012-2660) - CVE-2012-2660 rubygem-actionpack: Unsafe query generation
Summary: CVE-2012-2660 rubygem-actionpack: Unsafe query generation
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2012-2660
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 827364 829510 829511
Blocks: 767033 836071
TreeView+ depends on / blocked
 
Reported: 2012-06-01 08:22 UTC by Jan Lieskovsky
Modified: 2019-09-29 12:53 UTC (History)
13 users (show)

Fixed In Version: rubygem-actionpack 3.0.13, rubygem-actionpack 3.1.5, rubygem-actionpack 3.2.4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-26 15:51:53 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:1542 0 normal SHIPPED_LIVE Moderate: CloudForms Commons 1.1 security update 2012-12-05 00:29:06 UTC
Red Hat Product Errata RHSA-2013:0154 0 normal SHIPPED_LIVE Critical: Ruby on Rails security update 2013-01-11 01:38:55 UTC
Red Hat Product Errata RHSA-2013:0582 0 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Enterprise 1.1.1 update 2013-03-01 00:05:18 UTC

Description Jan Lieskovsky 2012-06-01 08:22:48 UTC
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 08:42:41 UTC
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 08:43:57 UTC
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 08:45:11 UTC
Created rubygem-actionpack tracking bugs for this issue

Affects: fedora-all [bug 827364]

Comment 7 Fedora Update System 2012-06-15 00:23:51 UTC
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-15 00:28:59 UTC
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 12:33:27 UTC
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 19:31:14 UTC
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 20:42:03 UTC
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 19:06:31 UTC
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.