CVE-2012-6496 rubyonrails: SQL Injection
rubyonrails: no CVSS score yet. EPSS 4.6% estimated probability of exploitation activity in the next 30 days. Fixed in activerecord 2.3.15, 3.0.18, 3.1.9.
On this page
- EPSS
- 4.6% (unchanged from 4.6% a week ago; 4.6% 30 days ago) estimated probability of exploitation activity in the next 30 days; 92nd percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
- CWE
- CWE-89 Improper Neutralization of Special Elements used in an SQL Command (SQL Injection)
- OWASP Top 10
- A05:2025 Injection
- Published
- Modified
- NVD analysis
- Analyzed, since modified
- Record from
- the NVD, synced
Fix and patched versions
activerecord(RubyGems): fixed in 3.0.18, 3.1.9, 3.2.10, 2.3.15- Debian, Red Hat: fixed package versions per release
- Patch: https://bugzilla.redhat.com/show_bug.cgi?id=889649
Ask an AI about this CVE
Show the prompt
Explain CVE-2012-6496 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2012-6496?via=ask-ai-copy and https://cve.bz/cve/CVE-2012-6496?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2012-6496 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.
Affected
Versions
From the NVD's CPE matches.
| Product | Affected |
|---|---|
| rubyonrails:rails | 3.1.0 |
| rubyonrails:rails | 3.1.0:beta1 |
| rubyonrails:rails | 3.1.0:rc1 |
| rubyonrails:rails | 3.1.0:rc2 |
| rubyonrails:rails | 3.1.0:rc3 |
| rubyonrails:rails | 3.1.0:rc4 |
| rubyonrails:rails | 3.1.0:rc5 |
| rubyonrails:rails | 3.1.0:rc6 |
| rubyonrails:rails | 3.1.0:rc7 |
| rubyonrails:rails | 3.1.0:rc8 |
| rubyonrails:rails | 3.1.1 |
| rubyonrails:rails | 3.1.1:rc1 |
| rubyonrails:rails | 3.1.1:rc2 |
| rubyonrails:rails | 3.1.1:rc3 |
| rubyonrails:rails | 3.1.2 |
| rubyonrails:rails | 3.1.2:rc1 |
| rubyonrails:rails | 3.1.2:rc2 |
| rubyonrails:rails | 3.1.3 |
| rubyonrails:rails | 3.1.4 |
| rubyonrails:rails | 3.1.4:rc1 |
| rubyonrails:rails | 3.1.5 |
| rubyonrails:rails | 3.1.5:rc1 |
| rubyonrails:rails | 3.1.6 |
| rubyonrails:rails | 3.1.7 |
| rubyonrails:rails | 3.1.8 |
| rubyonrails:rails | 3.0.0 |
| rubyonrails:rails | 3.0.0:beta |
| rubyonrails:rails | 3.0.0:beta2 |
| rubyonrails:rails | 3.0.0:beta3 |
| rubyonrails:rails | 3.0.0:beta4 |
| rubyonrails:rails | 3.0.0:rc |
| rubyonrails:rails | 3.0.0:rc2 |
| rubyonrails:rails | 3.0.1 |
| rubyonrails:rails | 3.0.1:pre |
| rubyonrails:rails | 3.0.2 |
| rubyonrails:rails | 3.0.2:pre |
| rubyonrails:rails | 3.0.3 |
| rubyonrails:rails | 3.0.4:rc1 |
| rubyonrails:rails | 3.0.5 |
| rubyonrails:rails | 3.0.5:rc1 |
| rubyonrails:rails | 3.0.6 |
| rubyonrails:rails | 3.0.6:rc1 |
| rubyonrails:rails | 3.0.6:rc2 |
| rubyonrails:rails | 3.0.7 |
| rubyonrails:rails | 3.0.7:rc1 |
| rubyonrails:rails | 3.0.7:rc2 |
| rubyonrails:rails | 3.0.8 |
| rubyonrails:rails | 3.0.8:rc1 |
| rubyonrails:rails | 3.0.8:rc2 |
| rubyonrails:rails | 3.0.8:rc3 |
| rubyonrails:rails | 3.0.8:rc4 |
| rubyonrails:rails | 3.0.9 |
| rubyonrails:rails | 3.0.9:rc1 |
| rubyonrails:rails | 3.0.9:rc2 |
| rubyonrails:rails | 3.0.9:rc3 |
| rubyonrails:rails | 3.0.9:rc4 |
| rubyonrails:rails | 3.0.9:rc5 |
| rubyonrails:rails | 3.0.10 |
| rubyonrails:rails | 3.0.10:rc1 |
| rubyonrails:rails | 3.0.11 |
| rubyonrails:rails | 3.0.12 |
| rubyonrails:rails | 3.0.12:rc1 |
| rubyonrails:rails | 3.0.13 |
| rubyonrails:rails | 3.0.13:rc1 |
| rubyonrails:rails | 3.0.14 |
| rubyonrails:rails | 3.0.16 |
| rubyonrails:ruby_on_rails | through 3.0.17 |
| rubyonrails:ruby_on_rails | 3.0.4 |
| rubyonrails:rails | 3.2.0 |
| rubyonrails:rails | 3.2.0:rc1 |
| rubyonrails:rails | 3.2.0:rc2 |
| rubyonrails:rails | 3.2.1 |
| rubyonrails:rails | 3.2.2 |
| rubyonrails:rails | 3.2.2:rc1 |
| rubyonrails:rails | 3.2.3 |
| rubyonrails:rails | 3.2.3:rc1 |
| rubyonrails:rails | 3.2.3:rc2 |
| rubyonrails:rails | 3.2.4 |
| rubyonrails:rails | 3.2.4:rc1 |
| rubyonrails:rails | 3.2.5 |
| rubyonrails:rails | 3.2.6 |
| rubyonrails:rails | 3.2.7 |
| rubyonrails:rails | 3.2.8 |
| rubyonrails:rails | 3.2.9 |
Packages (OSV)
| Advisory | Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|---|
| GHSA-gh2w-j7cx-2664 | RubyGems | activerecord | >=3.0.0.beta <3.0.18 | 3.0.18 |
| GHSA-gh2w-j7cx-2664 | RubyGems | activerecord | >=3.1.0 <3.1.9 | 3.1.9 |
| GHSA-gh2w-j7cx-2664 | RubyGems | activerecord | >=3.2.0 <3.2.10 | 3.2.10 |
| GHSA-gh2w-j7cx-2664 | RubyGems | activerecord | <2.3.15 | 2.3.15 |
Linux distributions
| Distribution | Release | Package | Fixed in | Advisory |
|---|---|---|---|---|
| Debian | 6.0 | rails | 2.3.5-1.2+squeeze4 | DSA-2597-1 |
| Debian | 12, 13, 14 | rails | 2.3.14.1 | DEBIAN-CVE-2012-6496 |
| Red Hat | openshift:1::el6 | jenkins | 0:1.498-1.1.el6op | RHSA-2013:0220 |
| Red Hat | openshift:1::el6 | mongodb, libmongodb, mongodb-devel and 2 more | 0:2.0.2-6.el6op | RHSA-2013:0220 |
| Red Hat | openshift:1::el6 | openshift-console | 0:0.0.13-2.el6op | RHSA-2013:0220 |
| Red Hat | openshift:1::el6 | openshift-origin-broker | 0:1.0.10-1.el6op | RHSA-2013:0220 |
| Red Hat | openshift:1::el6 | openshift-origin-broker-util | 0:1.0.14-1.el6op | RHSA-2013:0220 |
| Red Hat | openshift:1::el6 | openshift-origin-cartridge-ruby-1.8, openshift-origin-cartridge-ruby-1.9-scl | 0:1.0.5-1.el6op | RHSA-2013:0220 |
| Red Hat | openshift:1::el6 | openshift-origin-node-util | 0:1.0.7-1.el6op | RHSA-2013:0220 |
| Red Hat | openshift:1::el6 | openshift-origin-port-proxy, openshift-origin-cartridge-haproxy-1.4 | 0:1.0.3-1.el6op | RHSA-2013:0220 |
| Red Hat | openshift:1::el6 | rhc | 0:1.3.2-1.3.el6op | RHSA-2013:0220 |
| Red Hat | openshift:1::el6 | ruby193-mod_passenger, ruby193-rubygem-passenger, ruby193-rubygem-passenger-doc and 4 more | 0:3.0.12-21.el6op | RHSA-2013:0220 |
| Red Hat | openshift:1::el6 | ruby193-rubygem-activerecord, ruby193-rubygem-activerecord-doc | 1:3.2.8-2.el6 | RHSA-2013:0220 |
| Red Hat | openshift:1::el6 | rubygem-activerecord | 1:3.0.13-3.el6op | RHSA-2013:0220 |
| 6 more for Red Hat in the JSON and on Red Hat's page. | ||||
From the distributions' data via OSV.dev: the Debian Security Tracker; Red Hat Security Data © Red Hat, Inc., CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Red Hat.
Red Hat
Red Hat rates this Moderate.
| Product | Package | State | Advisory |
|---|---|---|---|
| CloudForms for RHEL 6 | rubygem-actionpack-1:3.0.10-11.el6cf | Fixed 2013-01-10 | RHSA-2013:0155 |
| CloudForms for RHEL 6 | rubygem-activerecord-1:3.0.10-8.el6cf | Fixed 2013-01-10 | RHSA-2013:0155 |
| CloudForms for RHEL 6 | rubygem-activesupport-1:3.0.10-5.el6cf | Fixed 2013-01-10 | RHSA-2013:0155 |
| Red Hat Subscription Asset Manager 1.1 | rubygem-actionpack-1:3.0.10-11.el6cf | Fixed 2013-01-10 | RHSA-2013:0154 |
| Red Hat Subscription Asset Manager 1.1 | rubygem-activerecord-1:3.0.10-8.el6cf | Fixed 2013-01-10 | RHSA-2013:0154 |
| Red Hat Subscription Asset Manager 1.1 | rubygem-activesupport-1:3.0.10-5.el6cf | Fixed 2013-01-10 | RHSA-2013:0154 |
| RHEL 6 Version of OpenShift Enterprise | jenkins-0:1.498-1.1.el6op | Fixed 2013-01-31 | RHSA-2013:0220 |
| RHEL 6 Version of OpenShift Enterprise | mongodb-0:2.0.2-6.el6op | Fixed 2013-01-31 | RHSA-2013:0220 |
| RHEL 6 Version of OpenShift Enterprise | openshift-console-0:0.0.13-2.el6op | Fixed 2013-01-31 | RHSA-2013:0220 |
| RHEL 6 Version of OpenShift Enterprise | openshift-origin-broker-0:1.0.10-1.el6op | Fixed 2013-01-31 | RHSA-2013:0220 |
| RHEL 6 Version of OpenShift Enterprise | openshift-origin-broker-util-0:1.0.14-1.el6op | Fixed 2013-01-31 | RHSA-2013:0220 |
| RHEL 6 Version of OpenShift Enterprise | openshift-origin-cartridge-haproxy-1.4-0:1.0.3-1.el6op | Fixed 2013-01-31 | RHSA-2013:0220 |
| RHEL 6 Version of OpenShift Enterprise | openshift-origin-cartridge-ruby-1.8-0:1.0.5-1.el6op | Fixed 2013-01-31 | RHSA-2013:0220 |
| RHEL 6 Version of OpenShift Enterprise | openshift-origin-cartridge-ruby-1.9-scl-0:1.0.5-1.el6op | Fixed 2013-01-31 | RHSA-2013:0220 |
| RHEL 6 Version of OpenShift Enterprise | openshift-origin-msg-node-mcollective-0:1.0.2-1.el6op | Fixed 2013-01-31 | RHSA-2013:0220 |
| RHEL 6 Version of OpenShift Enterprise | openshift-origin-node-util-0:1.0.7-1.el6op | Fixed 2013-01-31 | RHSA-2013:0220 |
| RHEL 6 Version of OpenShift Enterprise | openshift-origin-port-proxy-0:1.0.3-1.el6op | Fixed 2013-01-31 | RHSA-2013:0220 |
| RHEL 6 Version of OpenShift Enterprise | rhc-0:1.3.2-1.3.el6op | Fixed 2013-01-31 | RHSA-2013:0220 |
| RHEL 6 Version of OpenShift Enterprise | ruby193-rubygem-activerecord-1:3.0.13-3.el6op | Fixed 2013-01-31 | RHSA-2013:0220 |
| OpenShift Enterprise 1 | ruby-rubygem-activerecord | Affected | |
| 8 more in the JSON and on Red Hat's page. | |||
Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2012-6496.
Attack patterns (CAPEC)
- CAPEC-7 Blind SQL Injection Likelihood: High · Severity: High
- CAPEC-66 SQL Injection Likelihood: High · Severity: High
- CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High
- CAPEC-109 Object Relational Mapping Injection Likelihood: Low · Severity: High
- CAPEC-110 SQL Injection through SOAP Parameter Tampering Likelihood: High · Severity: Very High
- CAPEC-470 Expanding Control over the Operating System from the Database Severity: Very High
The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.
References
- https://bugzilla.redhat.com/show_bug.cgi?id=889649
- http://blog.phusion.nl/2013/01/03/rails-sql-injection-vulnerability-hold-your-horses-here-are-the-facts/
- http://rhn.redhat.com/errata/RHSA-2013-0154.html
- http://rhn.redhat.com/errata/RHSA-2013-0155.html
- http://rhn.redhat.com/errata/RHSA-2013-0220.html
- http://rhn.redhat.com/errata/RHSA-2013-0544.html
- http://security.gentoo.org/glsa/glsa-201401-22.xml
- http://www.securityfocus.com/bid/57084
- https://groups.google.com/group/rubyonrails-security/msg/23daa048baf28b64?dmode=source&output=gplain