Skip to content
Noroxi
NVD / CVE Program· CNA mitre

CVE-2012-6496: 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…

HighCVSS 7.5 · v2.0—No exploit Fix available

Noroxi assessment

Priority: Monitor (action score 31/100)

  • The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
  • Probability of exploitation in the next 30 days: 4.5% (FIRST EPSS); higher than 91.7% of all records.
  • No special conditions are required; it is repeatable.
  • Fixed version: rails (Debian:12) 2.3.14.1; rails (Debian:6.0) 2.3.5-1.2+squeeze4; jenkins (Red Hat:openshift:1::el6) 0:1.498-1.1.el6op.

Low priority for now. Upgrade to rails (Debian:12) 2.3.14.1; rails (Debian:6.0) 2.3.5-1.2+squeeze4; jenkins (Red Hat:openshift:1::el6) 0:1.498-1.1.el6op or later.

Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it

Primary sources: NVD · CVE.org · FIRST EPSS

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.

Published
Jan 4, 2013
Updated
Jun 16, 2026
EPSS
4.5% · 91th percentile

Report tools

JSON

Action score

31

Monitor

Low priority for now.

CVSS
30 / 40 · 7.5 / 10
CISA KEV
0 / 30 · Not listed
EPSS
1 / 30 · 4.5%

Get told when this record changes

  • Not in KEV: no record of exploitation in the wild
  • No public exploit code on record
  • A fix has been released

If any of these changes, we'll tell you in the daily email digest.

Follow CVE-2012-6496

When you'll hear from us

  • when it enters CISA KEV
  • when exploit code appears or is weaponized
  • when the record is updated (including a fixed version)
  • when EPSS rises 20 points in a week

One daily email digest (06:00 UTC); connect a webhook for KEV listings and weaponized exploits every 10 minutes on paid plans, on the hour on the free plan.

Your free account also gets you

  • CVE alerts: add the products and versions you run, get the new CVEs that affect them
  • Uptime monitoring: 1 site, instant email when it goes down
  • Add your domain: subdomains and takeover risk scanned every week (1 domain)
  • 10 scans an hour on the security tools, at most 30 a day (3 a day without an account), an API key and MCP
  • All your scans in one panel: findings, what changed in the last scan, a report per domain or per client (PDF, share link)
All free tools
Is your version affected? Check it

Noroxi analysis

What does it mean in your environment?

The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.

We use this product, ask for help

Affected systems

Is your version affected?

Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.

VendorProduct
rubyonrailsrails
rubyonrailsruby on rails

Affected versions

NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.

  • rubyonrails rails3.0.0
  • rubyonrails rails3.0.1
  • rubyonrails rails3.0.10
  • rubyonrails rails3.0.11
  • rubyonrails rails3.0.12
  • rubyonrails rails3.0.13
  • rubyonrails rails3.0.14
  • rubyonrails rails3.0.16

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
Debian:12railsbefore 2.3.14.12.3.14.1
Debian:6.0railsbefore 2.3.5-1.2+squeeze42.3.5-1.2+squeeze4
Red Hat:openshift:1::el6jenkinsbefore 0:1.498-1.1.el6op0:1.498-1.1.el6op
Red Hat:openshift:1::el6libmongodbbefore 0:2.0.2-6.el6op0:2.0.2-6.el6op
Red Hat:openshift:1::el6mongodbbefore 0:2.0.2-6.el6op0:2.0.2-6.el6op
Red Hat:openshift:1::el6mongodb-debuginfobefore 0:2.0.2-6.el6op0:2.0.2-6.el6op
Red Hat:openshift:1::el6mongodb-develbefore 0:2.0.2-6.el6op0:2.0.2-6.el6op
Red Hat:openshift:1::el6mongodb-serverbefore 0:2.0.2-6.el6op0:2.0.2-6.el6op
Red Hat:openshift:1::el6openshift-consolebefore 0:0.0.13-2.el6op0:0.0.13-2.el6op
Red Hat:openshift:1::el6openshift-origin-brokerbefore 0:1.0.10-1.el6op0:1.0.10-1.el6op
Red Hat:openshift:1::el6openshift-origin-broker-utilbefore 0:1.0.14-1.el6op0:1.0.14-1.el6op
Red Hat:openshift:1::el6openshift-origin-cartridge-haproxy-1.4before 0:1.0.3-1.el6op0:1.0.3-1.el6op
Red Hat:openshift:1::el6openshift-origin-cartridge-ruby-1.8before 0:1.0.5-1.el6op0:1.0.5-1.el6op
Red Hat:openshift:1::el6openshift-origin-cartridge-ruby-1.9-sclbefore 0:1.0.5-1.el6op0:1.0.5-1.el6op
Red Hat:openshift:1::el6openshift-origin-msg-node-mcollectivebefore 0:1.0.2-1.el6op0:1.0.2-1.el6op
Red Hat:openshift:1::el6openshift-origin-node-utilbefore 0:1.0.7-1.el6op0:1.0.7-1.el6op
Red Hat:openshift:1::el6openshift-origin-port-proxybefore 0:1.0.3-1.el6op0:1.0.3-1.el6op
Red Hat:openshift:1::el6rhcbefore 0:1.3.2-1.3.el6op0:1.3.2-1.3.el6op
Red Hat:openshift:1::el6ruby193-mod_passengerbefore 0:3.0.12-21.el6op0:3.0.12-21.el6op
Red Hat:openshift:1::el6ruby193-rubygem-activerecordbefore 1:3.2.8-2.el61:3.2.8-2.el6
Red Hat:openshift:1::el6ruby193-rubygem-activerecord-docbefore 1:3.2.8-2.el61:3.2.8-2.el6
Red Hat:openshift:1::el6ruby193-rubygem-passengerbefore 0:3.0.12-21.el6op0:3.0.12-21.el6op
Red Hat:openshift:1::el6ruby193-rubygem-passenger-debuginfobefore 0:3.0.12-21.el6op0:3.0.12-21.el6op
Red Hat:openshift:1::el6ruby193-rubygem-passenger-develbefore 0:3.0.12-21.el6op0:3.0.12-21.el6op

+16

Other highest-scoring records for the same primary product.

  • CVE-2019-5418There is a File Content Disclosure vulnerability in Action View <5.2.2.1, <5.1.6.2, <5.0.7.2, <4.2.11.1 and v3 where specially crafted…KEV
    90Now
  • CVE-2016-0752Directory traversal vulnerability in Action View in Ruby on Rails before 3.2.22.1, 4.0.x and 4.1.x before 4.1.14.1, 4.2.x before 4.2.5.1…KEV
    89Now
  • CVE-2019-5420A remote code execution vulnerability in development mode Rails <5.2.2.1, <6.0.0.beta3 can allow an attacker to guess the automatically…
    66This week

Published before and after this one in the same product

  • ← EarlierCVE-2012-3464Aug 10, 2012 · Cross-site scripting (XSS) vulnerability in activesupport/lib/active_support/core_ext/string/output_safety.rb in Ruby on Rails before…
    18Monitor
  • ← EarlierCVE-2012-3465Aug 10, 2012 · Cross-site scripting (XSS) vulnerability in actionpack/lib/action_view/helpers/sanitize_helper.rb in the strip_tags helper in Ruby on Rails…
    18Monitor
  • Later →CVE-2012-6497Jan 4, 2013 · The Authlogic gem for Ruby on Rails, when used with certain versions before 3.2.10, makes potentially unsafe find_by_id method calls, which…
    21Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
debian:rails2.3.14.1 · Debian:12Package registry (OSV)
red hat:libmongodb0:2.0.2-6.el6op · Red Hat:openshift:1::el6Package registry (OSV)
red hat:mongodb0:2.0.2-6.el6op · Red Hat:openshift:1::el6Package registry (OSV)
red hat:mongodb-debuginfo0:2.0.2-6.el6op · Red Hat:openshift:1::el6Package registry (OSV)
red hat:mongodb-devel0:2.0.2-6.el6op · Red Hat:openshift:1::el6Package registry (OSV)
red hat:mongodb-server0:2.0.2-6.el6op · Red Hat:openshift:1::el6Package registry (OSV)
red hat:openshift-console0:0.0.13-2.el6op · Red Hat:openshift:1::el6Package registry (OSV)
red hat:openshift-origin-broker0:1.0.10-1.el6op · Red Hat:openshift:1::el6Package registry (OSV)
red hat:openshift-origin-broker-util0:1.0.14-1.el6op · Red Hat:openshift:1::el6Package registry (OSV)
red hat:rhc0:1.3.2-1.3.el6op · Red Hat:openshift:1::el6Package registry (OSV)
red hat:ruby193-mod_passenger0:3.0.12-21.el6op · Red Hat:openshift:1::el6Package registry (OSV)
red hat:ruby193-rubygem-activerecord1:3.2.8-2.el6 · Red Hat:openshift:1::el6Package registry (OSV)
red hat:ruby193-rubygem-activerecord-doc1:3.2.8-2.el6 · Red Hat:openshift:1::el6Package registry (OSV)
RubyGems:activerecord2.3.15Package registry (OSV)
RubyGems:activerecord3.0.18Package registry (OSV)
RubyGems:activerecord3.1.9Package registry (OSV)
RubyGems:activerecord3.2.10Package registry (OSV)

Exploit status

No known public exploit

No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

No dated events beyond publication.

Bug bounty scope

The product’s vendor appears in a public program. Matched by name; verify the scope text in the program.

Not on record for this CVE: EPSS history · patch commit or PR link · researcher credit · variant or chain candidate.

Technical details

Attack conditions

  • No special conditions are required; it is repeatable.

If successful

Confidentiality
P · data can be read
Integrity
P · data or configuration can be modified
Availability
P · the service can be disrupted
Attack complexity
Low
Confidentiality impact
P
Integrity impact
P
Availability impact
P

CVSS vector

AV:N/AC:L/Au:N/C:P/I:P/A:P

nvd-primary

Root cause

The query text is built by concatenating user input. The database cannot tell where the data ends and the command begins.

A representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.

Vulnerable

ts
const owner = req.query.owner;const rows = await db.query(  "SELECT * FROM files WHERE owner = '" + owner + "'");

Fixed

ts
const owner = req.query.owner;const rows = await db.query(  "SELECT * FROM files WHERE owner = $1",  [owner]);

References

All records