Amazon Linux 2 : ruby (ALAS-2024-2486)

high Nessus Plugin ID 191511

Synopsis

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

Description

The version of ruby installed on the remote host is prior to 2.0.0.648-36. It is, therefore, affected by multiple vulnerabilities as referenced in the ALAS2-2024-2486 advisory.

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)

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 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 for CVE-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)

CGI::Cookie.parse in Ruby through 2.6.8 mishandles security prefixes in cookie names. This also affects the CGI gem through 0.3.0 for Ruby. (CVE-2021-41819)

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 ruby' to update your system.

See Also

https://alas.aws.amazon.com/AL2/ALAS-2024-2486.html

https://alas.aws.amazon.com/cve/html/CVE-2019-15845.html

https://alas.aws.amazon.com/cve/html/CVE-2019-16201.html

https://alas.aws.amazon.com/cve/html/CVE-2019-16254.html

https://alas.aws.amazon.com/cve/html/CVE-2019-16255.html

https://alas.aws.amazon.com/cve/html/CVE-2021-41819.html

https://alas.aws.amazon.com/faqs.html

Plugin Details

Severity: High

ID: 191511

File Name: al2_ALAS-2024-2486.nasl

Version: 1.2

Type: local

Agent: unix

Published: 3/5/2024

Updated: 12/11/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:ruby-doc, p-cpe:/a:amazon:linux:ruby-tcltk, p-cpe:/a:amazon:linux:ruby-irb, p-cpe:/a:amazon:linux:rubygem-rake, p-cpe:/a:amazon:linux:rubygem-psych, p-cpe:/a:amazon:linux:ruby-devel, p-cpe:/a:amazon:linux:ruby-libs, p-cpe:/a:amazon:linux:ruby, p-cpe:/a:amazon:linux:rubygem-json, p-cpe:/a:amazon:linux:rubygems, p-cpe:/a:amazon:linux:rubygem-bigdecimal, p-cpe:/a:amazon:linux:rubygems-devel, cpe:/o:amazon:linux:2, p-cpe:/a:amazon:linux:rubygem-minitest, p-cpe:/a:amazon:linux:rubygem-io-console, p-cpe:/a:amazon:linux:ruby-debuginfo, p-cpe:/a:amazon:linux:rubygem-rdoc

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: 2/29/2024

Vulnerability Publication Date: 11/26/2019

Reference Information

CVE: CVE-2019-15845, CVE-2019-16201, CVE-2019-16254, CVE-2019-16255, CVE-2021-41819