2014-01-22 17:22:39 +04:00
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
<!DOCTYPE glsa SYSTEM "http://www.gentoo.org/dtd/glsa.dtd">
|
|
|
|
|
<glsa id="201401-22">
|
|
|
|
|
<title>Active Record: SQL injection</title>
|
|
|
|
|
<synopsis>A vulnerability in Active Record could allow a remote attacker to
|
|
|
|
|
inject SQL commands.
|
|
|
|
|
</synopsis>
|
|
|
|
|
<product type="ebuild">activerecord</product>
|
2017-09-29 08:47:49 +03:00
|
|
|
|
<announced>2014-01-21</announced>
|
2018-01-15 09:09:28 +03:00
|
|
|
|
<revised count="1">2014-01-21</revised>
|
2014-01-22 17:22:39 +04:00
|
|
|
|
<bug>449826</bug>
|
|
|
|
|
<access>remote</access>
|
|
|
|
|
<affected>
|
|
|
|
|
<package name="dev-ruby/activerecord" auto="yes" arch="*">
|
|
|
|
|
<unaffected range="ge">2.3.14-r1</unaffected>
|
|
|
|
|
<vulnerable range="lt">2.3.14-r1</vulnerable>
|
|
|
|
|
</package>
|
|
|
|
|
</affected>
|
|
|
|
|
<background>
|
|
|
|
|
<p>Active Record is a Ruby gem that allows database entries to be
|
|
|
|
|
manipulated as objects.
|
|
|
|
|
</p>
|
|
|
|
|
</background>
|
|
|
|
|
<description>
|
|
|
|
|
<p>An Active Record method parameter can mistakenly be used as a scope.</p>
|
|
|
|
|
</description>
|
|
|
|
|
<impact type="low">
|
|
|
|
|
<p>A remote attacker could use specially crafted input to execute arbitrary
|
|
|
|
|
SQL statements.
|
|
|
|
|
</p>
|
|
|
|
|
</impact>
|
|
|
|
|
<workaround>
|
|
|
|
|
<p>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)’
|
|
|
|
|
</p>
|
|
|
|
|
</workaround>
|
|
|
|
|
<resolution>
|
|
|
|
|
<p>All Active Record users should upgrade to the latest version:</p>
|
|
|
|
|
|
|
|
|
|
<code>
|
|
|
|
|
# emerge --sync
|
|
|
|
|
# emerge --ask --oneshot --verbose ">=dev-ruby/activerecord-2.3.14-r1"
|
|
|
|
|
</code>
|
|
|
|
|
|
|
|
|
|
</resolution>
|
|
|
|
|
<references>
|
2017-09-29 08:47:49 +03:00
|
|
|
|
<uri link="https://nvd.nist.gov/nvd.cfm?cvename=CVE-2012-6496">CVE-2012-6496</uri>
|
2014-01-22 17:22:39 +04:00
|
|
|
|
</references>
|
2017-09-29 08:47:49 +03:00
|
|
|
|
<metadata tag="requester" timestamp="2013-12-11T02:08:41Z">
|
2014-01-22 17:22:39 +04:00
|
|
|
|
creffett
|
|
|
|
|
</metadata>
|
2017-09-29 08:47:49 +03:00
|
|
|
|
<metadata tag="submitter" timestamp="2014-01-21T20:21:31Z">
|
2014-01-22 17:22:39 +04:00
|
|
|
|
creffett
|
|
|
|
|
</metadata>
|
|
|
|
|
</glsa>
|