portage-ng / portage / dev-ruby / activerecord / 7.2.3
portage-ng glsa
1 advisory reference dev-ruby/activerecord · none place version 7.2.3 in a vulnerable range
▸ GLSA 201401-22 Active Record: SQL injection this version unaffected low remote 2014-01-21

A vulnerability in Active Record could allow a remote attacker to inject SQL commands.

Announced
2014-01-21
Revised
2014-01-21
Access
remote
Bugs
#449826
Advisory
https://security.gentoo.org/glsa/201401-22

Affected packages

PackageArchVulnerableUnaffected
dev-ruby/activerecord*< 2.3.14-r1>= 2.3.14-r1

Background

Active Record is a Ruby gem that allows database entries to be manipulated as objects.

Description

An Active Record method parameter can mistakenly be used as a scope.

Impact

A remote attacker could use specially crafted input to execute arbitrary SQL statements.

Workaround

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)’

Resolution

All Active Record users should upgrade to the latest version:

# emerge --sync
# emerge --ask --oneshot --verbose ">=dev-ruby/activerecord-2.3.14-r1"

References