GLSA-201401-22 : Active Record: SQL injection

This script is Copyright (C) 2014 Tenable Network Security, Inc.


Synopsis :

The remote Gentoo host is missing one or more security-related
patches.

Description :

The remote host is affected by the vulnerability described in GLSA-201401-22
(Active Record: SQL injection)

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
&lsquo
Post.find_by_id(params[:id])&rsquo
in code using Active Record to
&lsquo
Post.find_by_id(params[:id].to_s)&rsquo


See also :

http://www.gentoo.org/security/en/glsa/glsa-201401-22.xml

Solution :

All Active Record users should upgrade to the latest version:
# emerge --sync
# emerge --ask --oneshot --verbose '>=dev-ruby/activerecord-2.3.14-r1'

Risk factor :

High / CVSS Base Score : 7.5
(CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P)
CVSS Temporal Score : 6.5
(CVSS2#E:ND/RL:OF/RC:C)
Public Exploit Available : true

Family: Gentoo Local Security Checks

Nessus Plugin ID: 72077 ()

Bugtraq ID: 57084

CVE ID: CVE-2012-6496