CVE Vulnerabilities

CVE-2024-27281

Deserialization of Untrusted Data

Published: May 14, 2024 | Modified: Nov 21, 2024
CVSS 3.x
N/A
Source:
NVD
CVSS 2.x
RedHat/V2
RedHat/V3
4.5 MODERATE
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
Ubuntu
MEDIUM

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.

Weakness

The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.

Affected Software

Name Vendor Start Version End Version
Red Hat Enterprise Linux 8 RedHat ruby:3.0-8100020240522072634.489197e6 *
Red Hat Enterprise Linux 8 RedHat ruby:3.1-8100020240510101534.489197e6 *
Red Hat Enterprise Linux 8 RedHat ruby:3.3-8100020240522151542.489197e6 *
Red Hat Enterprise Linux 8 RedHat ruby:2.5-8100020240627152904.489197e6 *
Red Hat Enterprise Linux 9 RedHat ruby:3.1-9040020240503183840.9 *
Red Hat Enterprise Linux 9 RedHat ruby:3.3-9040020240522171337.9 *
Red Hat Enterprise Linux 9 RedHat ruby-0:3.0.7-162.el9_4 *
Jruby Ubuntu focal *
Jruby Ubuntu mantic *
Jruby Ubuntu oracular *
Jruby Ubuntu trusty/esm *
Ruby2.3 Ubuntu esm-infra/xenial *
Ruby2.5 Ubuntu esm-infra/bionic *
Ruby2.7 Ubuntu esm-infra/focal *
Ruby2.7 Ubuntu focal *
Ruby3.0 Ubuntu jammy *
Ruby3.1 Ubuntu mantic *
Ruby3.2 Ubuntu noble *

Potential Mitigations

  • Make fields transient to protect them from deserialization.
  • An attempt to serialize and then deserialize a class containing transient fields will result in NULLs where the transient data should be. This is an excellent way to prevent time, environment-based, or sensitive variables from being carried over and used improperly.

References