Bug 1365017 (CVE-2016-6317) - CVE-2016-6317 rubygem-activerecord: unsafe query generation in Active Record
Summary: CVE-2016-6317 rubygem-activerecord: unsafe query generation in Active Record
Alias: CVE-2016-6317
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1366479 1367060 1367061
Blocks: 1365019
TreeView+ depends on / blocked
Reported: 2016-08-08 11:20 UTC by Martin Prpič
Modified: 2021-02-17 03:27 UTC (History)
3 users (show)

Fixed In Version: rubygem-activerecord
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the way Active Record handled certain special values in dynamic finders and relations. If a Ruby on Rails application performed JSON parameter parsing, a remote attacker could possibly manipulate search conditions in SQL queries generated by the application.
Clone Of:
Last Closed: 2016-09-13 11:18:58 UTC

Attachments (Terms of Use)
4-2-unsafe-query-generation.patch (2.79 KB, text/plain)
2016-08-08 11:21 UTC, Martin Prpič
no flags Details

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:1855 0 normal SHIPPED_LIVE Moderate: rh-ror42 security update 2016-09-13 15:09:39 UTC

Description Martin Prpič 2016-08-08 11:20:35 UTC
The following flaw was found in Active Record:

Due to the way Active Record interprets parameters in combination with the way that JSON parameters are parsed, it is possible for an attacker to issue unexpected database queries with "IS NULL" or empty 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 or eliminate a WHERE clause when most users wouldn't expect it.

This issue only affects the 4.2.x versions of Active Record.

Comment 1 Martin Prpič 2016-08-08 11:20:43 UTC

Name: the Ruby on Rails project
Upstream: joernchen (Phenoelit)

Comment 3 Martin Prpič 2016-08-08 11:21:35 UTC
Created attachment 1188641 [details]

Comment 4 Martin Prpič 2016-08-12 06:00:07 UTC
Created rubygem-activerecord tracking bugs for this issue:

Affects: fedora-all [bug 1366479]

Comment 5 Martin Prpič 2016-08-12 06:00:59 UTC
External References:


Comment 6 Tomas Hoger 2016-08-12 20:08:04 UTC
Upstream commit:


Comment 8 errata-xmlrpc 2016-09-13 11:12:27 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS

Via RHSA-2016:1855 https://rhn.redhat.com/errata/RHSA-2016-1855.html

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