Description
The Active Record component in Ruby on Rails 2.3.x, 3.0.x, 3.1.x, and 3.2.x does not ensure that the declared data type of a database column is used during comparisons of input values to stored values in that column, which makes it easier for remote attackers to conduct data-type injection attacks against Ruby on Rails applications via a crafted value, as demonstrated by unintended interaction between the "typed XML" feature and a MySQL database.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | rails | 2.3.14.1 | — |
| Debian 13 | rails | 2.3.14.1 | — |
| Debian 12 | rails | 2.3.14.1 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| RubyGems | activerecord | < 4.2.0 | 4.2.0 | GHSA-f57c-hx33-hvh8 |
References
- http://pl.reddit.com/r/netsec/comments/17yajp/mysql_madness_and_rails/
- [rubyonrails-security] 20130207 Potential Query Manipulation with Common Rails Practises mailing-list
- http://www.phenoelit.org/blog/archives/2013/02/index.html
- [oss-security] 20130424 CVE-2013-3221 can also relate to Microsoft SQL Server and IBM DB2 mailing-list
- https://gist.github.com/dakull/5442275
- [oss-security] 20130207 Potential Query Manipulation with Common Rails Practises mailing-list