Lucene search

K
gentooGentoo FoundationGLSA-201401-22
HistoryJan 21, 2014 - 12:00 a.m.

Active Record: SQL injection

2014-01-2100:00:00
Gentoo Foundation
security.gentoo.org
24

7.5 High

CVSS2

Access Vector

NETWORK

Access Complexity

LOW

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:L/Au:N/C:P/I:P/A:P

0.004 Low

EPSS

Percentile

74.7%

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"
OSVersionArchitecturePackageVersionFilename
Gentooanyalldev-ruby/activerecord<Β 2.3.14-r1UNKNOWN

7.5 High

CVSS2

Access Vector

NETWORK

Access Complexity

LOW

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:L/Au:N/C:P/I:P/A:P

0.004 Low

EPSS

Percentile

74.7%