CVE-2011-2930 activerecord vulnerable to SQL Injection

High 7.5 Published Updated

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.

PackageAffectedFixed in
activerecord RubyGemsFrom 2.0.02.3.13
activerecord RubyGemsFrom 2.0.02.3.13
activerecord RubyGemsFrom 3.0.0.beta3.0.10
activerecord RubyGemsFrom 3.0.0.beta3.0.10
activerecord RubyGemsFrom 3.1.0.beta13.1.0.rc5
activerecord RubyGemsFrom 3.1.0.beta13.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.

All Rubyonrails Rails vulnerabilities

Sources

Also known as DEBIAN-CVE-2011-2930, GHSA-h6w6-xmqv-7q78.

Is CVE-2011-2930 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free