Zerosecurity
  • Home
  • Security
    • Exploits
    • Mobile Security
  • Malware
  • Data Breaches
  • Crypto
  • Privacy
  • Downloads
    • Malwarebytes
    • Exploits
    • Paper Downloads
    • Software & Service Reviews
No Result
View All Result
SUBSCRIBE
Zerosecurity
  • Home
  • Security
    • Exploits
    • Mobile Security
  • Malware
  • Data Breaches
  • Crypto
  • Privacy
  • Downloads
    • Malwarebytes
    • Exploits
    • Paper Downloads
    • Software & Service Reviews
No Result
View All Result
Zerosecurity
No Result
View All Result
Home Exploits

Ruby on Rails SQL Injection Vulnerability

Paul Anderson by Paul Anderson
May 31, 2012 - Updated on June 30, 2012
in Exploits, Security
0
74
SHARES
1.2k
VIEWS
Share on FacebookShare on Twitter

SQL Injection Vulnerability in Ruby on Rails

You might also like

Downthem DDoS service owner gets a 2-year prison sentence

Cloudflare Stops Record-Breaking DDoS

Chrome Browser Extension Vytal Prevents Privacy Leaks

There is a SQL injection vulnerability in Active Record, version 3.0 and later. This vulnerability has been assigned
the CVE identifier CVE-2012-2661.

Versions Affected: 3.0.0 and ALL later versions
Not affected: 2.3.14
Fixed Versions: 3.2.4, 3.1.5, 3.0.13

Email: http://pastebin.com/L1YnP3UT

Impact
——
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.

All users running an affected release should upgrade immediately.

Impacted code directly passes request params to the `where` method of an ActiveRecord class like this:

Post.where(:id => params[:id]).all

An attacker can make a request that causes `params[:id]` to return a specially crafted hash that will cause the WHERE
clause of the SQL statement to query an arbitrary table with some value.

Releases
——–
The FIXED releases are available at the normal locations.

Workarounds
———–
This issue can be mitigated by casting the parameter to an expected value. For example, change this:

Post.where(:id => params[:id]).all

to this:

Post.where(:id => params[:id].to_s).all

Patches
——-
To aid users who aren’t able to upgrade immediately we have provided patches for the two supported release series.
They are in git-am format and consist of a single changeset. We have also provided a patch for the 3.0 series despite
the fact it is unmaintained.

* 3-0-params_sql_injection.patch – Patch for 3.0 series
* 3-1-params_sql_injection.patch – Patch for 3.1 series
* 3-2-params_sql_injection.patch – Patch for 3.2 series

Please note that only the 3.1.x and 3.2.x series are supported at present. Users of earlier unsupported releases are
advised to upgrade as soon as possible as we cannot guarantee the continued availability of security fixes for
unsupported releases.

Credits
——-

Thanks to Ben Murphy for reporting the vulnerability to us, and to Chad Pyne of thoughtbot for helping us verify the
fix.

FIX:

Attachment: 3-0-params_sql_injection.patch
Description:

Attachment: 3-1-params_sql_injection.patch
Description:

Attachment: 3-2-params_sql_injection.patch
Description:

Attachment: _bin
Description:

Source: http://seclists.org/oss-sec/2012/q2/448

Tags: exploit.newonrailsruby
Share30Tweet19
Paul Anderson

Paul Anderson

Editor and chief at ZeroSecurity. Expertise includes programming, malware analysis, and penetration testing. If you would like to write for ZeroSecurity, please click "Contact us" at the top of the page.

Recommended For You

Downthem DDoS service owner gets a 2-year prison sentence

by Christi Rogalski
June 30, 2022
0
Downthem DDoS Service owner sentenced

Matthew Gatrel, a resident of St. Charles, Illinois, has been sentenced to two years in prison for violating the Computer Fraud and Abuse Act (CFAA). The 33-year-old was...

Read more

Cloudflare Stops Record-Breaking DDoS

by Christi Rogalski
June 29, 2022
0
Cloudflare record breaking DDoS

Cloudflare has reported that it successfully neutralized the largest recorded DDoS attack in history. The attack, a 26 million request per second onslaught, targeted a customer on the...

Read more

Chrome Browser Extension Vytal Prevents Privacy Leaks

by Christi Rogalski
June 19, 2022 - Updated on June 20, 2022
0
Vytal Chrome Extension spoofs location data

Released in 2008, Google Chrome is a cross-platform web browser. With over 3.2 billion internet users worldwide, there's no denying that Chrome is the most popular browser today....

Read more

State-sponsored Iranian Hackers utilize .NET DNS Backdoor in new Attack

by Kyle
June 12, 2022
0
Lycaeum APT DNS hijacking backdoor

An Advanced Persistent Threat (APT) hacking group based out of Iran going by the name Lycaeum has been seen using a .NET-based DNS backdoor to target organizations within...

Read more

WatchDog’s new multi-stage cryptojacking attack unsurfaced

by Christi Rogalski
June 11, 2022
0
WatchDog Targets Docker Containers

Cado Security’s honeypot has recently captured a rather interesting cryptojacker from what they believe to be the WatchDog hacking group. They note that although the attack’s life cycle...

Read more
Next Post
[Confirmed] US and Israel Created Stuxnet

[Confirmed] US and Israel Created Stuxnet

Related News

Google Chrome Extension fingerprinting source

Google Chrome exposes user extensions to fingerprinting

July 1, 2022
Downthem DDoS Service owner sentenced

Downthem DDoS service owner gets a 2-year prison sentence

June 30, 2022
Cloudflare record breaking DDoS

Cloudflare Stops Record-Breaking DDoS

June 29, 2022
Zerosecurity

We cover the latest in Information Security & Blockchain news, as well as threat trends targeting both sectors.

Categories

  • Crypto
  • Data Breaches
  • DotNet Framework
  • Downloads
  • Exploits
  • Exploits
  • Information
  • Legal
  • Malware
  • Malware Analysis
  • Mobile Security
  • Paper Downloads
  • Piracy
  • Privacy
  • Programming
  • Public
  • Security
  • Security
  • Software & Service Reviews
  • Technology News
  • Tools
  • Tutorials
  • Video Tutorials
  • Whitepapers
  • Zero Security
  • Contact Us
  • List of our Writers

© 2022 ZeroSecurity, All Rights Reserved.

No Result
View All Result
  • Home
  • Security
    • Tools
  • Data Breaches
  • Malware
  • Privacy
  • Contact Us

© 2022 ZeroSecurity, All Rights Reserved.