SQL Injection in Rubyonrails Rails
CVE-2012-2661
The Active Record component in Ruby on Rails 3.0.x before 3.0.13, 3.1.x before 3.1.5, and 3.2.x before 3.2.4 does not properly implement the passing of request data to a where method in an ActiveRecord class, which allows remote attackers to conduct certain SQL injection attacks via nested query parameters that leverage unintended recursion, a related issue to CVE-2012-2695.
Vulnerability class: SQL Injection
Published · last modified .
CVSS v2 metric
CVSS v2 base score 5.0 (Medium). Vector: AV:N/AC:L/Au:N/C:P/I:N/A:N. This CVE predates CVSS v3 and has no v3 score from NVD.
EPSS exploit prediction
EPSS 0.040, 90.8th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
- Rubyonrails Rails — versions 3.0.0, 3.0.1, 3.0.2
- Rubyonrails Ruby On Rails — versions 3.0.4
Weakness classification (CWE)
Public exploits and proof-of-concept code
2 public repositories with exploit or proof-of-concept code for this CVE:
- r4x0r1337/-CVE-2012-2661-ActiveRecord-SQL-injection- (1 star, last pushed 2023-05-21)
- Blackyguy/-CVE-2012-2661-ActiveRecord-SQL-injection-
Also mentioned in 6 other repositories (dxktw/cyber-vault, ehayushpathak/WebApp-Hacking, nemocyberworld/captain-nemo, …). These reference the CVE in a list, notes or a scanner and are not exploit code for it.
References
- [rubyonrails-security] 20120531 SQL Injection Vulnerability in Ruby on Rails (CVE-2012-2661) (mailing-list, Exploit)
- SUSE-SU-2012:1012 (vendor-advisory)
- SUSE-SU-2012:1014 (vendor-advisory)
- openSUSE-SU-2012:1066 (vendor-advisory)
- RHSA-2013:0154 (vendor-advisory)
This CVE has public exploit evidence. See the latest CVEs with public exploits.