Ubuntu 14.04 LTS / 16.04 LTS / 18.04 LTS : Ruby vulnerabilities (USN-3945-1)

high Nessus Plugin ID 183623

Synopsis

The remote Ubuntu host is missing one or more security updates.

Description

The remote Ubuntu 14.04 LTS / 16.04 LTS / 18.04 LTS host has packages installed that are affected by multiple vulnerabilities as referenced in the USN-3945-1 advisory.

- A Directory Traversal issue was discovered in RubyGems 2.7.6 and later through 3.0.2. Before making new directories or touching files (which now include path-checking code for symlinks), it would delete the target destination. If that destination was hidden behind a symlink, a malicious gem could delete arbitrary files on the user's machine, presuming the attacker could guess at paths. Given how frequently gem is run as sudo, and how predictable paths are on modern systems (/tmp, /usr, etc.), this could likely lead to data loss or an unusable system. (CVE-2019-8320)

- An issue was discovered in RubyGems 2.6 and later through 3.0.2. Since Gem::UserInteraction#verbose calls say without escaping, escape sequence injection is possible. (CVE-2019-8321)

- An issue was discovered in RubyGems 2.6 and later through 3.0.2. The gem owner command outputs the contents of the API response directly to stdout. Therefore, if the response is crafted, escape sequence injection may occur. (CVE-2019-8322)

- An issue was discovered in RubyGems 2.6 and later through 3.0.2. Gem::GemcutterUtilities#with_response may output the API response to stdout as it is. Therefore, if the API side modifies the response, escape sequence injection may occur. (CVE-2019-8323)

- An issue was discovered in RubyGems 2.6 and later through 3.0.2. A crafted gem with a multi-line name is not handled correctly. Therefore, an attacker could inject arbitrary code to the stub line of gemspec, which is eval-ed by code in ensure_loadable_spec during the preinstall check. (CVE-2019-8324)

- An issue was discovered in RubyGems 2.6 and later through 3.0.2. Since Gem::CommandManager#run calls alert_error without escaping, escape sequence injection is possible. (There are many ways to cause an error.) (CVE-2019-8325)

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

Solution

Update the affected packages.

See Also

https://ubuntu.com/security/notices/USN-3945-1

Plugin Details

Severity: High

ID: 183623

File Name: ubuntu_USN-3945-1.nasl

Version: 1.0

Type: local

Agent: unix

Published: 10/20/2023

Updated: 10/20/2023

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

Risk Information

VPR

Risk Factor: Medium

Score: 6.0

CVSS v2

Risk Factor: High

Base Score: 8.8

Temporal Score: 6.9

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

CVSS Score Source: CVE-2019-8320

CVSS v3

Risk Factor: High

Base Score: 8.8

Temporal Score: 7.9

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

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

CVSS Score Source: CVE-2019-8324

Vulnerability Information

CPE: p-cpe:/a:canonical:ubuntu_linux:libruby2.3, p-cpe:/a:canonical:ubuntu_linux:libruby2.5, p-cpe:/a:canonical:ubuntu_linux:libtcltk-ruby1.9.1, p-cpe:/a:canonical:ubuntu_linux:ri1.9.1, p-cpe:/a:canonical:ubuntu_linux:ruby1.9.1, p-cpe:/a:canonical:ubuntu_linux:ruby1.9.1-dev, p-cpe:/a:canonical:ubuntu_linux:ruby1.9.1-examples, p-cpe:/a:canonical:ubuntu_linux:ruby1.9.1-full, p-cpe:/a:canonical:ubuntu_linux:ruby1.9.3, p-cpe:/a:canonical:ubuntu_linux:ruby2.0, p-cpe:/a:canonical:ubuntu_linux:ruby2.0-dev, p-cpe:/a:canonical:ubuntu_linux:ruby2.0-tcltk, p-cpe:/a:canonical:ubuntu_linux:ruby2.3, p-cpe:/a:canonical:ubuntu_linux:ruby2.3-dev, p-cpe:/a:canonical:ubuntu_linux:ruby2.3-tcltk, p-cpe:/a:canonical:ubuntu_linux:ruby2.5, p-cpe:/a:canonical:ubuntu_linux:ruby2.5-dev, cpe:/o:canonical:ubuntu_linux:14.04:-:lts, cpe:/o:canonical:ubuntu_linux:16.04:-:lts, cpe:/o:canonical:ubuntu_linux:18.04:-:lts, p-cpe:/a:canonical:ubuntu_linux:libruby1.9.1, p-cpe:/a:canonical:ubuntu_linux:libruby2.0

Required KB Items: Host/cpu, Host/Debian/dpkg-l, Host/Ubuntu, Host/Ubuntu/release

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 4/11/2019

Vulnerability Publication Date: 4/11/2019

Reference Information

CVE: CVE-2019-8320, CVE-2019-8321, CVE-2019-8322, CVE-2019-8323, CVE-2019-8324, CVE-2019-8325

USN: 3945-1