CVE-2024-27281
ruby: RCE vulnerability with .rdoc_options in RDoc
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · March 21, 2024
Updated · May 6, 2026
Description
A flaw was found in Rubygem RDoc. When parsing .rdoc_options used for configuration in RDoc as a YAML file there are no restrictions on the classes that can be restored. This issue may lead to object injection, resulting in remote code execution.
Statement
An attacker would need to provide a maliciously crafted configuration file or documentation cache to a user in order to trigger this vulnerability.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
CVSS / CWE
CVSS 3.1 · 4.5CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
CWE-94 · Improper Control of Generation of Code ('Code Injection')