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

CVE-2012-2661: SQL injection vulnerability in Active Record

June 22, 2012 (updated August 8, 2019)

Due to the way Active Record handles nested query parameters, an attacker can use a specially crafted request to inject some forms of SQL into your application’s SQL queries.

References

  • cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-2661
  • github.com/rails/rails/commit/71f7917c553cdc9a0ee49e87af0efb7429759718
  • github.com/rubysec/ruby-advisory-db/blob/master/gems/activerecord/OSVDB-82403.yml

Code Behaviors & Features

Detect and mitigate CVE-2012-2661 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 before 3.0.13, all versions starting from 3.1.0 before 3.1.5, all versions starting from 3.2.0 before 3.2.4

Fixed versions

  • 3.0.13
  • 3.1.5
  • 3.2.4

Solution

Upgrade to versions 3.0.13, 3.1.5, 3.2.4 or above.

Impact 5 MEDIUM

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

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-2661.yml

Spotted a mistake? Edit the file on GitLab.

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

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