SQL injection in Ruby on Rails - CVE-2012-2695

 

SQL injection in Ruby on Rails - CVE-2012-2695

Published: September 29, 2025


Vulnerability identifier: #VU116153
CSH Severity: Medium
CVSS v4: 6.9 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N]
CVE-ID: CVE-2012-2695
CWE-ID: CWE-89
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

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.

Successful exploitation of this vulnerability may allow a remote attacker to read, delete, modify data in database and gain complete control over the affected application.


Affected software

Ruby on Rails

How to mitigate CVE-2012-2695

Cybersecurity Help is currently unaware of any official solution to address this vulnerability..

Ruby on Rails - addressed in versions 3.0.14, 3.1.6, 3.2.6

External References

Related Security Bulletins