CVE-2016-6317: ActiveRecord in Ruby on Rails allows database-query bypass
7.5
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.58745%
CWE
Published
10/24/2017
Updated
7/4/2023
KEV Status
No
Technology
Ruby
Technical Details
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
activerecord | rubygems | >= 4.2.0, <= 4.2.7.0 | 4.2.7.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper handling of parameter arrays containing nil values and empty hashes in query construction. The primary vulnerable function is ActiveRecord::QueryMethods#where which processes WHERE clause conditions. The patch modifies this method to add safeguards against empty hashes and [nil] values. Dynamic finders (find_by_*) that rely on where() inherit this vulnerability. The evidence comes from the security advisory's description of NULL check bypass and the nature of fixes shown in referenced patches that modify query generation logic.