Amazon Linux AMI : ruby24 (ALAS-2020-1422)

high Nessus Plugin ID 140096

Synopsis

The remote Amazon Linux AMI host is missing a security update.

Description

The version of ruby24 installed on the remote host is prior to 2.4.10-2.12. It is, therefore, affected by multiple vulnerabilities as referenced in the ALAS-2020-1422 advisory.

Ruby through 2.4.7, 2.5.x through 2.5.6, and 2.6.x through 2.6.4 allows HTTP Response Splitting. If a program using WEBrick inserts untrusted input into the response header, an attacker can exploit it to insert a newline character to split a header, and inject malicious content to deceive clients. NOTE: this issue exists because of an incomplete fix forCVE-2017-17742, which addressed the CRLF vector, but did not address an isolated CR or an isolated LF. (CVE-2019-16254)

Ruby through 2.4.7, 2.5.x through 2.5.6, and 2.6.x through 2.6.4 allows code injection if the first argument (aka the command argument) to Shell#[] or Shell#test in lib/shell.rb is untrusted data. An attacker can exploit this to call an arbitrary Ruby method. (CVE-2019-16255)

jQuery before 3.0.0 is vulnerable to Cross-site Scripting (XSS) attacks when a cross-domain Ajax request is performed without the dataType option, causing text/javascript responses to be executed.
(CVE-2015-9251)

The JSON gem through 2.2.0 for Ruby, as used in Ruby 2.4 through 2.4.9, 2.5 through 2.5.7, and 2.6 through 2.6.5, has an Unsafe Object Creation Vulnerability. This is quite similar toCVE-2013-0269, but does not rely on poor garbage-collection behavior within Ruby. Specifically, use of JSON parsing methods can lead to creation of a malicious object within the interpreter, with adverse effects that are application- dependent. (CVE-2020-10663)

jQuery before 1.9.0 is vulnerable to Cross-site Scripting (XSS) attacks. The jQuery(strInput) function does not differentiate selectors from HTML in a reliable fashion. In vulnerable versions, jQuery determined whether the input was HTML by looking for the '<' character anywhere in the string, giving attackers more flexibility when attempting to construct a malicious payload. In fixed versions, jQuery only deems the input to be HTML if it explicitly starts with the '<' character, limiting exploitability only to attackers who can control the beginning of a string, which is far less common. (CVE-2012-6708)

WEBrick::HTTPAuth::DigestAuth in Ruby through 2.4.7, 2.5.x through 2.5.6, and 2.6.x through 2.6.4 has a regular expression Denial of Service cause by looping/backtracking. A victim must expose a WEBrick server that uses DigestAuth to the Internet or a untrusted network. (CVE-2019-16201)

Ruby through 2.4.7, 2.5.x through 2.5.6, and 2.6.x through 2.6.4 mishandles path checking within File.fnmatch functions. A flaw was discovered in Ruby in the way certain functions handled strings containing NULL bytes. Specifically, the built-in methods File.fnmatch and its alias File.fnmatch? did not properly handle path patterns containing the NULL byte. A remote attacker could exploit this flaw to make a Ruby script access unexpected files and to bypass intended file system access restrictions.
(CVE-2019-15845)

Tenable has extracted the preceding description block directly from the tested product security advisory.

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.

Solution

Run 'yum update ruby24' to update your system.

See Also

https://alas.aws.amazon.com/ALAS-2020-1422.html

https://access.redhat.com/security/cve/CVE-2012-6708

https://access.redhat.com/security/cve/CVE-2015-9251

https://access.redhat.com/security/cve/CVE-2019-15845

https://access.redhat.com/security/cve/CVE-2019-16201

https://access.redhat.com/security/cve/CVE-2019-16254

https://access.redhat.com/security/cve/CVE-2019-16255

https://access.redhat.com/security/cve/CVE-2020-10663

Plugin Details

Severity: High

ID: 140096

File Name: ala_ALAS-2020-1422.nasl

Version: 1.5

Type: local

Agent: unix

Published: 8/31/2020

Updated: 12/17/2024

Supported Sensors: Agentless Assessment, Continuous Assessment, Frictionless Assessment Agent, Frictionless Assessment AWS, Nessus Agent, Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: Medium

Base Score: 6.8

Temporal Score: 5.3

Vector: CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P

CVSS Score Source: CVE-2019-16255

CVSS v3

Risk Factor: High

Base Score: 8.1

Temporal Score: 7.3

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

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

Vulnerability Information

CPE: p-cpe:/a:amazon:linux:ruby24, p-cpe:/a:amazon:linux:rubygem24-did_you_mean, cpe:/o:amazon:linux, p-cpe:/a:amazon:linux:rubygem24-test-unit, p-cpe:/a:amazon:linux:rubygem24-json, p-cpe:/a:amazon:linux:rubygem24-minitest5, p-cpe:/a:amazon:linux:rubygem24-power_assert, p-cpe:/a:amazon:linux:rubygem24-io-console, p-cpe:/a:amazon:linux:ruby24-doc, p-cpe:/a:amazon:linux:rubygem24-xmlrpc, p-cpe:/a:amazon:linux:ruby24-libs, p-cpe:/a:amazon:linux:rubygems24, p-cpe:/a:amazon:linux:ruby24-irb, p-cpe:/a:amazon:linux:rubygems24-devel, p-cpe:/a:amazon:linux:rubygem24-rdoc, p-cpe:/a:amazon:linux:rubygem24-net-telnet, p-cpe:/a:amazon:linux:rubygem24-bigdecimal, p-cpe:/a:amazon:linux:ruby24-devel, p-cpe:/a:amazon:linux:rubygem24-psych, p-cpe:/a:amazon:linux:ruby24-debuginfo

Required KB Items: Host/local_checks_enabled, Host/AmazonLinux/release, Host/AmazonLinux/rpm-list

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 8/26/2020

Vulnerability Publication Date: 2/13/2013

Reference Information

CVE: CVE-2012-6708, CVE-2015-9251, CVE-2019-15845, CVE-2019-16201, CVE-2019-16254, CVE-2019-16255, CVE-2020-10663

BID: 57899, 102792, 103684, 105658

ALAS: 2020-1422