CVE-2011-2930 activerecord vulnerable to SQL Injection
Remote attackers can execute arbitrary SQL commands via crafted column names in Ruby on Rails ActiveRecord adapters.
- Exploited in the wild
- Not known
- Login needed
- Not stated
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2011-2930?
CVE-2011-2930 is a high-severity SQL injection vulnerability in Rubyonrails Rails, published on 29 Aug 2011. It can be exploited over the network, with no action from the victim.
Official description
Multiple SQL injection vulnerabilities in the quote_table_name method in the ActiveRecord adapters in activerecord/lib/active_record/connection_adapters/ in Ruby on Rails before 2.3.13, 3.0.x before 3.0.10, and 3.1.x before 3.1.0.rc5 allow remote attackers to execute arbitrary SQL commands via a crafted column name.
Weakness: CWE-89
Which versions are affected by CVE-2011-2930?
6 open source packages ship an affected version, including activerecord. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
activerecord RubyGems | From 2.0.0 | 2.3.13 |
activerecord RubyGems | From 2.0.0 | 2.3.13 |
activerecord RubyGems | From 3.0.0.beta | 3.0.10 |
activerecord RubyGems | From 3.0.0.beta | 3.0.10 |
activerecord RubyGems | From 3.1.0.beta1 | 3.1.0.rc5 |
activerecord RubyGems | From 3.1.0.beta1 | 3.1.0.rc5 |
Products include Rubyonrails Rails, Rubyonrails Ruby on Rails.
How do I fix CVE-2011-2930?
Upgrade activerecord to a fixed version for your release line: 2.3.13, 3.0.10 or 3.1.0.rc5.
Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.
Is CVE-2011-2930 being exploited?
There is no known exploitation of CVE-2011-2930 in the wild and no public exploit code.
Other vulnerabilities in Rubyonrails Rails
- CVE-2013-0277 Active Record contains deserialization of arbitrary YAML
- CVE-2017-17916 SQL injection in n/a
- CVE-2017-17917 SQL injection in n/a
- CVE-2026-33195 Rails Active Storage has possible Path Traversal in DiskService
- CVE-2024-26142 Rails possible ReDoS vulnerability in Accept header parsing in Action Dispatch
Sources
Also known as DEBIAN-CVE-2011-2930, GHSA-h6w6-xmqv-7q78.