CVE-2012-2661 json
Active Record vulnerable to SQL Injection via nested query parameters
published 2012-06-22 14 y ago modified 2026-06-16 4 mo ago also GHSA-fh39-v733-mxfr , EUVD-2017-0229
- cvss
- 5.0
- version 2.0, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 4.0%
- EPSS 4.0% chance of exploitation in 30 days, percentile 90%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- rubygems activerecord 3.0.13, 3.1.5, 3.2.4
- php openshift 1 5.3.3-22.el6
- graphviz openshift 1 2.26.0-10.el6
- php-imap openshift 1 5.3.3-22.el6
- php-bcmath openshift 1 5.3.3-22.el6
- graphviz-gd openshift 1 2.26.0-10.el6
- php-process openshift 1 5.3.3-22.el6
- php-mbstring openshift 1 5.3.3-22.el6
- ruby193-ruby openshift 1 1.9.3.327-25.el6
red hat advisories RHSA-2013:0582
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2012-2661 updated cvss 4.3
rubygem-activerecord: SQL injection when processing nested query paramaters
-
Red Hat CloudForms Cloud Engine for RHEL 6 Server puppet 2.6.17-2.el6cf, rubygem-mail 2.3.0-3.el6cf, puppet-server 2.6.17-2.el6cf, rubygem-compass 0.11.5-2.el6cf, rubygem-net-ldap 0.1.1-3.el6cf, rubygem-chunky_png 1.2.0-3.el6cf, +6 more Red Hat CloudForms System Engine for RHEL 6 Server puppet 2.6.17-2.el6cf, rubygem-mail 2.3.0-3.el6cf, puppet-server 2.6.17-2.el6cf, rubygem-compass 0.11.5-2.el6cf, rubygem-net-ldap 0.1.1-3.el6cf, rubygem-chunky_png 1.2.0-3.el6cf, +6 morefixed: vendor fix RHSA-2012:1542
-
Red Hat OpenShift Enterprise Infrastructure graphviz 2.26.0-10.el6, graphviz-gd 2.26.0-10.el6, rubygem-bson 1.8.1-2.el6op, graphviz-ruby 2.26.0-10.el6, rubygem-mongo 1.8.1-2.el6op, ruby193-ruby 1.9.3.327-25.el6, +25 more Red Hat OpenShift Enterprise JBoss EAP add-on openshift-origin-cartridge-jbosseap-6.0 1.0.4-1.el6op Red Hat OpenShift Enterprise Node php 5.3.3-22.el6, php-imap 5.3.3-22.el6, php-bcmath 5.3.3-22.el6, php-process 5.3.3-22.el6, php-mbstring 5.3.3-22.el6, rubygem-bson 1.8.1-2.el6op, +32 morefixed: vendor fix RHSA-2013:0582
-
Red Hat Subscription Asset Manager for RHEL 6 Server rubygem-actionpack 3.0.10-11.el6cf, rubygem-activerecord 3.0.10-8.el6cf, rubygem-activesupport 3.0.10-5.el6cffixed: vendor fix RHSA-2013:0154
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
4.04% chance of exploitation in the next 30 days, higher than 90% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- groups.google.com https://groups.google.com/group/rubyonrails-security/msg/fc2da6c627fc92df?dmode=source&output=gplain referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:P/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| rubygems | activerecord | >=3.0.0, <3.0.13 >=3.1.0, <3.1.5 >=3.2.0, <3.2.4 |
3.0.13 3.1.5 3.2.4 |
Classification
- Weakness
-
- CWE-89 Improper Neutralization of Special Elements used in an SQL Command
- Technology feeds
References
-
groups.google.com
/group/rubyonrails-security/msg/fc2da6c627fc92df?dmode=source&output=gplain
mailing-list, web, exploit
-
lists.opensuse.org
/opensuse-security-announce/2012-08/msg00014.html
vendor-advisory, web
-
lists.opensuse.org
/opensuse-security-announce/2012-08/msg00016.html
vendor-advisory, web
-
lists.opensuse.org
/opensuse-updates/2012-08/msg00046.html
vendor-advisory, web
-
rhn.redhat.com
/errata/RHSA-2013-0154.html
vendor-advisory, web
-
nvd.nist.gov
/vuln/detail/CVE-2012-2661
advisory
Sources
- CVE List CVE-2012-2661
- GitHub Advisory GHSA-fh39-v733-mxfr
- NVD CVE-2012-2661
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.