SQL injection in Ruby on Rails



| Updated: 2025-09-29
Risk Medium
Patch available YES
Number of vulnerabilities 1
CVE-ID CVE-2012-2661
CWE-ID CWE-89
Exploitation vector Network
Public exploit N/A
Vulnerable software
Ruby on Rails
Universal components / Libraries / Scripting languages

Vendor Rails

Security Bulletin

This security bulletin contains one medium risk vulnerability.

1) SQL injection

EUVDB-ID: #VU116152

Risk: Medium

CVSSv4.0: 2.7 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:U/U:Green]

CVE-ID: CVE-2012-2661

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

Exploit availability: No

Description

The vulnerability allows a remote attacker to execute arbitrary SQL queries in database.

The vulnerability exists due to Active Record component in Ruby on Rails does not properly implement the passing of request data to a where method in an ActiveRecord class. A remote attacker can send a specially crafted request to the affected application and execute arbitrary SQL commands within the application database to read data.

Mitigation

Install update from vendor's website.

Vulnerable software versions

Ruby on Rails: 3.0.0.beta - 3.2.3 rc2

CPE2.3 External links

https://lists.opensuse.org/opensuse-security-announce/2012-08/msg00014.html
https://lists.opensuse.org/opensuse-security-announce/2012-08/msg00016.html
https://lists.opensuse.org/opensuse-updates/2012-08/msg00046.html
https://rhn.redhat.com/errata/RHSA-2013-0154.html
https://groups.google.com/group/rubyonrails-security/msg/fc2da6c627fc92df?dmode=source&output=gplain


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.



###SIDEBAR###