1 |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
2 |
Gentoo Linux Security Advisory GLSA 201401-22 |
3 |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
4 |
http://security.gentoo.org/ |
5 |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
6 |
|
7 |
Severity: Low |
8 |
Title: Active Record: SQL injection |
9 |
Date: January 21, 2014 |
10 |
Bugs: #449826 |
11 |
ID: 201401-22 |
12 |
|
13 |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
14 |
|
15 |
Synopsis |
16 |
======== |
17 |
|
18 |
A vulnerability in Active Record could allow a remote attacker to |
19 |
inject SQL commands. |
20 |
|
21 |
Background |
22 |
========== |
23 |
|
24 |
Active Record is a Ruby gem that allows database entries to be |
25 |
manipulated as objects. |
26 |
|
27 |
Affected packages |
28 |
================= |
29 |
|
30 |
------------------------------------------------------------------- |
31 |
Package / Vulnerable / Unaffected |
32 |
------------------------------------------------------------------- |
33 |
1 dev-ruby/activerecord < 2.3.14-r1 >= 2.3.14-r1 |
34 |
|
35 |
Description |
36 |
=========== |
37 |
|
38 |
An Active Record method parameter can mistakenly be used as a scope. |
39 |
|
40 |
Impact |
41 |
====== |
42 |
|
43 |
A remote attacker could use specially crafted input to execute |
44 |
arbitrary SQL statements. |
45 |
|
46 |
Workaround |
47 |
========== |
48 |
|
49 |
The vulnerability may be mitigated by converting the input to an |
50 |
expected value. This is accomplished by changing instances of |
51 |
'Post.find_by_id(params[:id])' in code using Active Record to |
52 |
'Post.find_by_id(params[:id].to_s)' |
53 |
|
54 |
Resolution |
55 |
========== |
56 |
|
57 |
All Active Record users should upgrade to the latest version: |
58 |
|
59 |
# emerge --sync |
60 |
# emerge --ask --oneshot -v ">=dev-ruby/activerecord-2.3.14-r1" |
61 |
|
62 |
References |
63 |
========== |
64 |
|
65 |
[ 1 ] CVE-2012-6496 |
66 |
http://nvd.nist.gov/nvd.cfm?cvename=CVE-2012-6496 |
67 |
|
68 |
Availability |
69 |
============ |
70 |
|
71 |
This GLSA and any updates to it are available for viewing at |
72 |
the Gentoo Security Website: |
73 |
|
74 |
http://security.gentoo.org/glsa/glsa-201401-22.xml |
75 |
|
76 |
Concerns? |
77 |
========= |
78 |
|
79 |
Security is a primary focus of Gentoo Linux and ensuring the |
80 |
confidentiality and security of our users' machines is of utmost |
81 |
importance to us. Any security concerns should be addressed to |
82 |
security@g.o or alternatively, you may file a bug at |
83 |
https://bugs.gentoo.org. |
84 |
|
85 |
License |
86 |
======= |
87 |
|
88 |
Copyright 2014 Gentoo Foundation, Inc; referenced text |
89 |
belongs to its owner(s). |
90 |
|
91 |
The contents of this document are licensed under the |
92 |
Creative Commons - Attribution / Share Alike license. |
93 |
|
94 |
http://creativecommons.org/licenses/by-sa/2.5 |