Skip to content
OpenAdvisories
High · 7.5 Public exploit CVE-2016-6317 EUVD-2017-0283GHSA-pr3r-4wrp-r2pv

ActiveRecord in Ruby on Rails allows database-query bypass

Published Sep 7, 2016 · Updated Aug 6, 2024 · Assigned by redhat

Description

Action Record in Ruby on Rails 4.2.x before 4.2.7.1 does not properly consider differences in parameter handling between the Active Record component and the JSON implementation, which allows remote attackers to bypass intended database-query restrictions and perform NULL checks or trigger missing WHERE clauses via a crafted request, as demonstrated by certain "[nil]" values, a related issue to CVE-2012-2660, CVE-2012-2694, and CVE-2013-0155.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 rails 2:4.2.7.1-1 —
Debian 13 rails 2:4.2.7.1-1 —
Debian 12 rails 2:4.2.7.1-1 —
ReleasePackageFixed inAdvisory
RHEL 2 rh-ror42-rubygem-actionpack +3 1:4.2.6-3.el7 RHSA-2016:1855
RHEL 2 rh-ror42-rubygem-actionview +1 4.2.6-3.el7 RHSA-2016:1855
ReleasePackageFixed inAdvisory
SUSE OpenStack Cloud 7 rubygem-actionpack-4_2 +1 4.2.9-7.3.1 SUSE-SU-2017:2716-1
SUSE OpenStack Cloud 7 rubygem-actionview-4_2 4.2.9-9.3.1 SUSE-SU-2017:2716-1
SUSE OpenStack Cloud 7 rubygem-activemodel-4_2 +1 4.2.9-6.3.1 SUSE-SU-2017:2716-1
SUSE OpenStack Cloud 7 rubygem-rails-4_2 +3 4.2.9-3.3.1 SUSE-SU-2017:2716-1
SUSE OpenStack Cloud 7 rubygem-rails-html-sanitizer 1.0.3-8.3.1 SUSE-SU-2017:2716-1
SUSE OpenStack Cloud 6 rubygem-actionpack-4_2 +1 4.2.9-7.3.1 SUSE-SU-2017:2716-1
SUSE OpenStack Cloud 6 rubygem-actionview-4_2 4.2.9-9.3.1 SUSE-SU-2017:2716-1
SUSE OpenStack Cloud 6 rubygem-activemodel-4_2 +1 4.2.9-6.3.1 SUSE-SU-2017:2716-1
SUSE OpenStack Cloud 6 rubygem-rails-4_2 +3 4.2.9-3.3.1 SUSE-SU-2017:2716-1
SUSE OpenStack Cloud 6 rubygem-rails-html-sanitizer 1.0.3-8.3.1 SUSE-SU-2017:2716-1
SUSE Enterprise Storage 4 rubygem-actionpack-4_2 +1 4.2.9-7.3.1 SUSE-SU-2017:2716-1
SUSE Enterprise Storage 4 rubygem-actionview-4_2 4.2.9-9.3.1 SUSE-SU-2017:2716-1
SUSE Enterprise Storage 4 rubygem-activemodel-4_2 +1 4.2.9-6.3.1 SUSE-SU-2017:2716-1
SUSE Enterprise Storage 4 rubygem-rails-4_2 +3 4.2.9-3.3.1 SUSE-SU-2017:2716-1
SUSE Enterprise Storage 4 rubygem-rails-html-sanitizer 1.0.3-8.3.1 SUSE-SU-2017:2716-1
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SUSE Enterprise Storage 3 rubygem-actionpack-4_2 +1 4.2.9-7.3.1 SUSE-SU-2017:2716-1
SUSE Enterprise Storage 3 rubygem-actionview-4_2 4.2.9-9.3.1 SUSE-SU-2017:2716-1
SUSE Enterprise Storage 3 rubygem-activemodel-4_2 +1 4.2.9-6.3.1 SUSE-SU-2017:2716-1
SUSE Enterprise Storage 3 rubygem-rails-4_2 +3 4.2.9-3.3.1 SUSE-SU-2017:2716-1
SUSE Enterprise Storage 3 rubygem-rails-html-sanitizer 1.0.3-8.3.1 SUSE-SU-2017:2716-1

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
RubyGems activerecord >= 4.2.0, < 4.2.7.1 4.2.7.1 GHSA-pr3r-4wrp-r2pv

Advisories 2

References