CVE-2012-6496
Active Record contains SQL Injection
Reported by mitre · Published January 4, 2013
activerecord is fixed in 3.2.10, 3.1.9, 3.0.18 and 1 more (RubyGems)
SQL injection vulnerability in the Active Record component in Ruby on Rails before 3.0.18, 3.1.x before 3.1.9, and 3.2.x before 3.2.10 allows remote attackers to execute arbitrary SQL commands via a crafted request that leverages incorrect behavior of dynamic finders in applications that can use unexpected data types in certain find_by_ method calls.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| activerecord | RubyGems | 3.2.10, 3.1.9, 3.0.18, 2.3.15 |
| ruby_on_rails | rubyonrails | 3.0.17 |
| ruby-activerecord-3.2 | Ubuntu:14.04:LTS | 3.2.16-1 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a | n/a |
| RubyGems | activerecord | 3.0.0.beta, 3.1.0, 3.2.0 |
| n/a | n/a | * |
Timeline
- Jan 4, 2013 CVE Published
- Feb 4, 2022 EPSS Score (30 in total, the first dated here)
- Aug 6, 2024 CVE Updated
- Mar 17, 2026 Security Advisory (2 in total, the first dated here)
- Oct 25, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2012-6496
vulnetix vdb fixes CVE-2012-6496
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2012-6496/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- x_refsource_CONFIRM
- RHSA-2013:0155 vendor-advisoryx_refsource_REDHAT
- x_refsource_MISC
- RHSA-2013:0220 vendor-advisoryx_refsource_REDHAT
- GLSA-201401-22 vendor-advisoryx_refsource_GENTOO
- RHSA-2013:0154 vendor-advisoryx_refsource_REDHAT
- [rubyonrails-security] 20130102 SQL Injection Vulnerability in Ruby on Rails (CVE-2012-5664) mailing-listx_refsource_MLIST
- 57084 vdb-entryx_refsource_BID
- RHSA-2013:0544 vendor-advisoryx_refsource_REDHAT
- https://github.com/rails/rails/commit/9de9b359d0d24f70f0f6c5c58a7ad8750684d456 fix
- https://nvd.nist.gov/vuln/detail/CVE-2012-6496 advisory
- https://github.com/advisories/GHSA-gh2w-j7cx-2664 advisory
- https://github.com/rails/rails url