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.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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.
GitHub 1 repository
-
kavgan/vuln_test_repo_public_ruby_gemfile_cve-2016-6317 ★ 0 · Sep 26, 2017
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| RubyGems | activerecord | >= 4.2.0, < 4.2.7.1 | 4.2.7.1 | GHSA-pr3r-4wrp-r2pv |
Advisories 2
- RHSA-2016:1855 Red Hat Security Advisory: rh-ror42 security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- SUSE-SU-2017:2716-1 Security update for the Ruby on Rails stack SUSE / openSUSE Security Updates · Feb 4, 2026
References
- 92434 vdb-entry
- [oss-security] 20160811 [CVE-2016-6317] Unsafe Query Generation Risk in Active Record mailing-list
- RHSA-2016:1855 vendor-advisory
- http://weblog.rubyonrails.org/2016/8/11/Rails-5-0-0-1-4-2-7-2-and-3-2-22-3-have-been-released/
- [ruby-security-ann] 20160811 [CVE-2016-6317] Unsafe Query Generation Risk in Active Record mailing-list