Lucene search

K
rubygemsRubySecRUBY:RUBY-2019-16255
HistorySep 30, 2019 - 9:00 p.m.

A code injection vulnerability of Shell#[] and Shell#test

2019-09-3021:00:00
RubySec
rubysec.com
22

CVSS2

6.8

Attack Vector

NETWORK

Attack Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

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

CVSS3

8.1

Attack Vector

NETWORK

Attack Complexity

HIGH

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

EPSS

0.009

Percentile

83.4%

Shell#[] and its alias Shell#test defined in lib/shell.rb allow code
injection if the first argument (aka the “command” argument) is untrusted
data. An attacker can exploit this to call an arbitrary Ruby method.

Note that passing untrusted data to methods of Shell is dangerous in general.
Users must never do it. However, we treat this particular case as a
vulnerability because the purpose of Shell#[] and Shell#[] is considered file
testing.

Affected configurations

Vulners
Node
rubyrubyRange2.4.72.5.0
OR
rubyrubyRange2.5.62.6.0
OR
rubyrubyRange2.6.42.7.0
OR
rubyrubyRange2.7.01>
VendorProductVersionCPE
rubyruby*cpe:2.3:a:ruby:ruby:*:*:*:*:*:*:*:*

CVSS2

6.8

Attack Vector

NETWORK

Attack Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

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

CVSS3

8.1

Attack Vector

NETWORK

Attack Complexity

HIGH

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

EPSS

0.009

Percentile

83.4%