A vulnerability in Active Record could allow a remote attacker to inject SQL commands.
|Package||dev-ruby/activerecord on all architectures|
|Affected versions||< 2.3.14-r1|
|Unaffected versions||>= 2.3.14-r1|
Active Record is a Ruby gem that allows database entries to be manipulated as objects.
An Active Record method parameter can mistakenly be used as a scope.
A remote attacker could use specially crafted input to execute arbitrary SQL statements.
The vulnerability may be mitigated by converting the input to an expected value. This is accomplished by changing instances of ‘Post.find_by_id(params[:id])’ in code using Active Record to ‘Post.find_by_id(params[:id].to_s)’
All Active Record users should upgrade to the latest version:
# emerge --sync # emerge --ask --oneshot --verbose ">=dev-ruby/activerecord-2.3.14-r1"
January 21, 2014
January 21, 2014: 1