Bug 1114427 (CVE-2014-3483)

Summary: CVE-2014-3483 rubygem-activerecord: SQL injection vulnerability in 'range' quoting
Product: [Other] Security Response Reporter: Murray McAllister <mmcallis>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: jorton, mmaslano, security-response-team, vondruch
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rubygem-activerecord 4.0.7, rubygem-activerecord 4.1.3. Doc Type: Bug Fix
Doc Text:
It was discovered that Active Record did not properly quote values of the range type attributes when using the PostgreSQL database adapter. A remote attacker could possibly use this flaw to conduct an SQL injection attack against applications using Active Record.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-20 10:45:28 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: 1115335, 1115336, 1115777    
Bug Blocks: 1114429    
Attachments:
Description Flags
4.0 patch from upstream
none
4.1 patch from upstream
none
ammended 4.0 patch from upstream
none
amended 4.1 patch from upstream none

Description Murray McAllister 2014-06-30 04:57:07 UTC
An SQL injection flaw was found in the PostgreSQL adapter for Active Record. An attacker could possibly perform SQL injection attacks if a Ruby on Rails application performed queries against the range type.

This issue affects versions 4.0.0 to 4.1.2. It is reported that versions earlier than 4.0 are not affected.

Acknowledgements:

Red Hat would like to thank the Ruby on Rails project for reporting this issue. Upstream acknowledges Sean Griffin of thoughtbot as the original reporter.

Comment 2 Murray McAllister 2014-06-30 04:59:38 UTC
Created attachment 913248 [details]
4.0 patch from upstream

Comment 3 Murray McAllister 2014-06-30 05:00:10 UTC
Created attachment 913249 [details]
4.1 patch from upstream

Comment 5 Kurt Seifried 2014-07-02 17:37:19 UTC
This is now public:
https://groups.google.com/forum/#!topic/rubyonrails-security/wDxePLJGZdI

Comment 6 Murray McAllister 2014-07-03 05:54:36 UTC
The original fixes for 4.x introduced a regression:

http://seclists.org/oss-sec/2014/q3/10

Comment 7 Murray McAllister 2014-07-03 05:57:41 UTC
Created attachment 914349 [details]
ammended 4.0 patch from upstream

Comment 8 Murray McAllister 2014-07-03 05:58:27 UTC
Created attachment 914350 [details]
amended 4.1 patch from upstream

Comment 9 Murray McAllister 2014-07-03 06:09:50 UTC
Created rubygem-activerecord tracking bugs for this issue:

Affects: fedora-20 [bug 1115777]

Comment 11 Martin Prpič 2014-07-14 09:26:17 UTC
IssueDescription:

It was discovered that Active Record did not properly quote values of the range type attributes when using the PostgreSQL database adapter. A remote attacker could possibly use this flaw to conduct an SQL injection attack against applications using Active Record.

Comment 12 errata-xmlrpc 2014-07-14 16:26:16 UTC
This issue has been addressed in following products:

  Red Hat Software Collections 1 for Red Hat Enterprise Linux 6
  Red Hat Software Collections 1 for Red Hat Enterprise Linux 6.4 EUS
  Red Hat Software Collections 1 for Red Hat Enterprise Linux 7

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

Comment 13 Kurt Seifried 2014-09-18 03:32:10 UTC
CFME doesn't use any range fields in the database backend. But we should rebase activerecord at some point.