Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. activerecord
  4. ›
  5. CVE-2012-6496

CVE-2012-6496: Active Record contains SQL Injection

October 24, 2017 (updated January 21, 2025)

SQL injection vulnerability in the Active Record component in Ruby on Rails before 2.3.15, 3.0.x 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.

References

  • bugzilla.redhat.com/show_bug.cgi?id=889649
  • github.com/advisories/GHSA-gh2w-j7cx-2664
  • github.com/rails/rails
  • github.com/rails/rails/commit/9de9b359d0d24f70f0f6c5c58a7ad8750684d456
  • groups.google.com/group/rubyonrails-security/msg/23daa048baf28b64?dmode=source&output=gplain
  • nvd.nist.gov/vuln/detail/CVE-2012-6496

Code Behaviors & Features

Detect and mitigate CVE-2012-6496 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 3.0.0.beta before 3.0.18, all versions before 3.0.18, all versions starting from 3.1.0 before 3.1.9, all versions starting from 3.2.0 before 3.2.10

Fixed versions

  • 3.0.18
  • 3.1.9
  • 3.2.10
  • 3.0.18

Solution

Upgrade to versions 3.0.18, 3.0.18, 3.1.9, 3.2.10 or above.

Impact 7.5 HIGH

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

Learn more about CVSS

Weakness

  • CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Source file

gem/activerecord/CVE-2012-6496.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:47 +0000.