Ruby < 3.0.7 / 3.1.x < 3.1.5 / 3.2.x < 3.2.4 / 3.3.x < 3.3.1 RCE

medium Nessus Plugin ID 200138

Synopsis

The remote host is missing a security update.

Description

The version of Ruby installed on the remote host is prior to 3.0.7, 3.1.5, 3.2.4, or 3.3.1. It is, therefore, affected by a vulnerability as referenced in the rce-rdoc-cve-2024-27281 advisory.

- An issue was discovered in RDoc 6.3.3 through 6.6.2, as distributed in Ruby 3.x through 3.3.0. When parsing .rdoc_options (used for configuration in RDoc) as a YAML file, object injection and resultant remote code execution are possible because there are no restrictions on the classes that can be restored.
(When loading the documentation cache, object injection and resultant remote code execution are also possible if there were a crafted cache.) The main fixed version is 6.6.3.1. For Ruby 3.0 users, a fixed version is rdoc 6.3.4.1. For Ruby 3.1 users, a fixed version is rdoc 6.4.1.1. For Ruby 3.2 users, a fixed version is rdoc 6.5.1.1. (CVE-2024-27281)

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

Solution

Upgrade to Ruby version 3.0.7 / 3.1.5 / 3.2.4 / 3.3.1 or later.

See Also

https://www.ruby-lang.org/en/news/2024/03/21/rce-rdoc-cve-2024-27281/

https://www.ruby-lang.org/en/news/2024/04/23/ruby-3-3-1-released/

Plugin Details

Severity: Medium

ID: 200138

File Name: ruby_rdoc_cve-2024-27281.nasl

Version: 1.2

Type: local

Agent: windows, macosx, unix

Family: Misc.

Published: 6/6/2024

Updated: 6/7/2024

Configuration: Enable thorough checks

Supported Sensors: Nessus Agent, Nessus

Risk Information

VPR

Risk Factor: Low

Score: 3.4

CVSS v2

Risk Factor: Low

Base Score: 3.7

Temporal Score: 2.7

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

CVSS Score Source: CVE-2024-27281

CVSS v3

Risk Factor: Medium

Base Score: 4.5

Temporal Score: 3.9

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

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

Vulnerability Information

CPE: cpe:/a:ruby-lang:ruby

Required KB Items: installed_sw/Ruby

Exploit Ease: No known exploits are available

Patch Publication Date: 4/23/2024

Vulnerability Publication Date: 4/25/2024

Reference Information

CVE: CVE-2024-27281

IAVA: 2024-A-0328