Amazon Linux AMI : ruby24 (ALAS-2017-915)

critical Nessus Plugin ID 104181

Synopsis

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

Description

Arbitrary heap exposure during a JSON.generate call

Ruby through 2.2.7, 2.3.x through 2.3.4, and 2.4.x through 2.4.1 can expose arbitrary memory during a JSON.generate call. The issues lies in using strdup in ext/json/ext/generator/generator.c, which will stop after encountering a '\\0' byte, returning a pointer to a string of length zero, which is not the length stored in space_len.
(CVE-2017-14064)

Escape sequence injection vulnerability in the Basic authentication of WEBrick

The Basic authentication code in WEBrick library in Ruby before 2.2.8, 2.3.x before 2.3.5, and 2.4.x through 2.4.1 allows remote attackers to inject terminal emulator escape sequences into its log and possibly execute arbitrary commands via a crafted user name. (CVE-2017-10784)

Buffer underrun in OpenSSL ASN1 decode

The decode method in the OpenSSL::ASN1 module in Ruby before 2.2.8, 2.3.x before 2.3.5, and 2.4.x through 2.4.1 allows attackers to cause a denial of service (interpreter crash) via a crafted string.
(CVE-2017-14033)

No size limit in summary length of gem spec

RubyGems version 2.6.12 and earlier is vulnerable to maliciously crafted gem specifications to cause a denial of service attack against RubyGems clients who have issued a `query` command. (CVE-2017-0900)

Arbitrary file overwrite due to incorrect validation of specification name

RubyGems version 2.6.12 and earlier fails to validate specification names, allowing a maliciously crafted gem to potentially overwrite any file on the filesystem. (CVE-2017-0901)

DNS hijacking vulnerability

RubyGems version 2.6.12 and earlier is vulnerable to a DNS hijacking vulnerability that allows a MITM attacker to force the RubyGems client to download and install gems from a server that the attacker controls.
(CVE-2017-0902)

Buffer underrun vulnerability in Kernel.sprintf

Ruby before 2.4.2, 2.3.5, and 2.2.8 is vulnerable to a malicious format string which contains a precious specifier (*) with a huge minus value. Such situation can lead to a buffer overrun, resulting in a heap memory corruption or an information disclosure from the heap.
(CVE-2017-0898)

Escape sequence in the 'summary' field of gemspec

RubyGems version 2.6.12 and earlier is vulnerable to maliciously crafted gem specifications that include terminal escape characters.
Printing the gem specification would execute terminal escape sequences. (CVE-2017-0899)

A vulnerability was found where the rubygems module was vulnerable to an unsafe YAML deserialization when inspecting a gem. Applications inspecting gem files without installing them can be tricked to execute arbitrary code in the context of the ruby interpreter. (CVE-2017-0903)

Solution

Run 'yum update ruby24' to update your system.

See Also

https://alas.aws.amazon.com/ALAS-2017-915.html

Plugin Details

Severity: Critical

ID: 104181

File Name: ala_ALAS-2017-915.nasl

Version: 3.5

Type: local

Agent: unix

Published: 10/27/2017

Updated: 4/10/2019

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

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: High

Base Score: 9.3

Temporal Score: 7.3

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

CVSS v3

Risk Factor: Critical

Base Score: 9.8

Temporal Score: 8.8

Vector: CVSS:3.0/AV:N/AC:L/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-doc, p-cpe:/a:amazon:linux:ruby24-irb, p-cpe:/a:amazon:linux:ruby24-libs, p-cpe:/a:amazon:linux:rubygem24-bigdecimal, p-cpe:/a:amazon:linux:rubygem24-did_you_mean, p-cpe:/a:amazon:linux:rubygem24-io-console, p-cpe:/a:amazon:linux:rubygem24-json, p-cpe:/a:amazon:linux:rubygem24-psych, p-cpe:/a:amazon:linux:rubygem24-xmlrpc, p-cpe:/a:amazon:linux:rubygems24, p-cpe:/a:amazon:linux:rubygems24-devel, cpe:/o:amazon:linux, p-cpe:/a:amazon:linux:ruby24, p-cpe:/a:amazon:linux:ruby24-debuginfo, p-cpe:/a:amazon:linux:ruby24-devel

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: 10/26/2017

Reference Information

CVE: CVE-2017-0898, CVE-2017-0899, CVE-2017-0900, CVE-2017-0901, CVE-2017-0902, CVE-2017-0903, CVE-2017-10784, CVE-2017-14033, CVE-2017-14064

ALAS: 2017-915