Bug 831581 (CVE-2012-2694) - CVE-2012-2694 rubygem-actionpack: Unsafe query generation (a different flaw than CVE-2012-2660)
Summary: CVE-2012-2694 rubygem-actionpack: Unsafe query generation (a different flaw t...
Status: CLOSED ERRATA
Alias: CVE-2012-2694
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: impact=low,public=20120612,reported=2...
Keywords: Reopened, Security
Depends On: 831586 831729 831801 846728 903993
Blocks: 767033 836071
TreeView+ depends on / blocked
 
Reported: 2012-06-13 11:17 UTC by Jan Lieskovsky
Modified: 2019-06-08 19:09 UTC (History)
13 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2014-09-19 05:07:37 UTC


Attachments (Terms of Use)


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

Description Jan Lieskovsky 2012-06-13 11:17:11 UTC
Originally the CVE identifier of CVE-2012-2660 has been assigned to the following issue:

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. (bug 827353)

Recently (2012-06-12) it has been reported:
[1] https://groups.google.com/group/rubyonrails-security/browse_thread/thread/8c82d9df8b401c5e

that there still exists a variant of this attack, which is possible to exploit even the upstream patch for the original CVE-2012-2660 issue has been applied. More from [1]:

--

Due to the way Active Record interprets parameters in combination with the way that Rack parses query parameters, it is possible for an attacker to issue unexpected database queries with "IS NULL" where clauses.  This issue does *not* let an attacker insert arbitrary values into an SQL query, however they can cause the query to check for NULL where most users wouldn't expect it.

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 `['xyz', nil]`.  The `['xyz', nil]` value will bypass the test for nil, but will still add an "IN ('xyz', NULL)" clause to the SQL query.

All users running an affected release should either upgrade or use one of the work arounds immediately. All users running an affected release should upgrade immediately. Please note, this vulnerability is a variant of CVE-2012-2660, even if you upgraded to address that issue, you must take action again. 

--

Upstream patches:
[2] https://groups.google.com/group/rubyonrails-security/attach/e2d3a87f2c211def/3-0-null_array_param.patch?part=3
    (against v3.0 branch)
[3] https://groups.google.com/group/rubyonrails-security/attach/e2d3a87f2c211def/3-1-null_array_param.patch?part=4
    (against v3.1 branch)
[4] https://groups.google.com/group/rubyonrails-security/attach/e2d3a87f2c211def/3-2-null_array_param.patch?part=5
    (against v3.2 branch)

Comment 1 Jan Lieskovsky 2012-06-13 11:20:40 UTC
This issue affects the versions of the rubygem-actionpack package, as shipped with Fedora release of 15, 16, and 17. Please schedule an update.

--

This issue did NOT affect the version of the rubygem-actionpack package, as shipped with Fedora EPEL 5 (the relevant functionality is not present in that version yet).

Comment 3 Jan Lieskovsky 2012-06-13 11:25:40 UTC
Created rubygem-actionpack tracking bugs for this issue

Affects: fedora-all [bug 831586]

Comment 7 Fedora Update System 2012-06-30 08:25:45 UTC
rubygem-actionpack-3.0.11-5.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-30 08:26:13 UTC
rubygem-actionpack-3.0.10-7.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 errata-xmlrpc 2012-12-04 19:31:30 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 10 errata-xmlrpc 2013-01-10 20:42:18 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:07:48 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.