Skip to content
Fencer Vulns
medium 4.5

CVE-2024-27281 json

RDoc RCE vulnerability with .rdoc_options

published 2024-03-25 2 y ago modified 2026-09-10 1 mo ago also EUVD-2024-0826 , GHSA-592j-995h-p23j

cvss
4.5
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
1.6%
EPSS 1.6% chance of exploitation in 30 days, percentile 75%
public exploits
0
none known

Summary

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.

Patch / fix

  • rubygems rdoc 6.3.4.1, 6.4.1.1, 6.5.1.1, 6.6.3.1
  • ruby-lang rdoc 6.3.4.1, 6.4.1.1, 6.5.1.1, 6.6.3.1
  • ruby3.1 Debian 12 3.1.2-7+deb12u1

debian advisories DEBIAN-CVE-2024-27281

  • ruby2.7 Ubuntu 20.04 LTS 2.7.0-5ubuntu1.13
  • ruby3.0 Ubuntu 22.04 LTS 3.0.2-7ubuntu2.6
  • ruby3.2 Ubuntu 24.04 LTS 3.2.3-1ubuntu0.24.04.1
  • ruby2.3 Ubuntu Pro 16.04 LTS 2.3.1-2~ubuntu16.04.16+esm9
  • ruby2.5 Ubuntu Pro 18.04 LTS 2.5.1-1ubuntu1.16+esm3

ubuntu advisories UBUNTU-CVE-2024-27281

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • ruby RHEL 8 2.5.9-112.module+el8.10.0+22021+135c76a8
  • ruby-irb RHEL 8 2.5.9-112.module+el8.10.0+22021+135c76a8
  • rubygems RHEL 8 2.7.6.3-112.module+el8.10.0+22021+135c76a8
  • ruby-libs RHEL 8 2.5.9-112.module+el8.10.0+22021+135c76a8
  • rubygem-pg RHEL 8 1.0.0-3.module+el8.9.0+19193+435404ae
  • rubygem-abrt RHEL 8 0.3.0-4.module+el8.10.0+22021+135c76a8
  • rubygem-bson RHEL 8 4.3.0-2.module+el8.9.0+19193+435404ae
  • rubygem-json RHEL 8 2.1.0-112.module+el8.10.0+22021+135c76a8

red hat advisories RHSA-2024:4499RHSA-2024:3838RHSA-2024:3671RHSA-2024:3670RHSA-2024:3668RHSA-2024:3546

  • ruby AlmaLinux 8 2.5.9-112.module_el8.10.0+3871+342e2c2f
  • ruby-irb AlmaLinux 8 2.5.9-112.module_el8.10.0+3871+342e2c2f
  • rubygems AlmaLinux 8 2.7.6.3-112.module_el8.10.0+3871+342e2c2f
  • ruby-libs AlmaLinux 8 2.5.9-112.module_el8.10.0+3871+342e2c2f
  • rubygem-pg AlmaLinux 8 1.0.0-3.module_el8.9.0+3635+c6f99506
  • rubygem-abrt AlmaLinux 8 0.3.0-4.module_el8.10.0+3871+342e2c2f
  • rubygem-bson AlmaLinux 8 4.3.0-2.module_el8.5.0+2625+ec418553
  • rubygem-bson AlmaLinux 8 4.3.0-2.module_el8.6.0+3170+4b08f9d4

almalinux advisories ALSA-2024:4499ALSA-2024:3838ALSA-2024:3668ALSA-2024:3670ALSA-2024:3671ALSA-2024:3546

  • ruby Rocky Linux 8 2.5.9-112.module+el8.10.0+1839+f1f156ae
  • rubygem-pg Rocky Linux 8 1.0.0-3.module+el8.9.0+1536+5f79634e
  • rubygem-abrt Rocky Linux 8 0.3.0-4.module+el8.5.0+738+032c9c02
  • rubygem-bson Rocky Linux 8 4.3.0-2.module+el8.9.0+1536+5f79634e
  • rubygem-mongo Rocky Linux 8 2.5.1-2.module+el8.9.0+1536+5f79634e
  • rubygem-mysql2 Rocky Linux 8 0.4.10-4.module+el8.9.0+1536+5f79634e
  • rubygem-bundler Rocky Linux 8 1.16.1-4.module+el8.9.0+1536+5f79634e
  • rubygem-pg Rocky Linux 9 1.3.5-1.module+el9.6.0+31865+0893c253

rocky linux advisories RLSA-2024:4499RLSA-2024:3668RLSA-2024:3671RLSA-2024:3546RLSA-2024:3670

  • ruby Alpine 3.17, Alpine 3.16 3.1.5-r0
  • ruby Alpine 3.19, Alpine 3.18 3.2.4-r0
  • ruby Alpine 3.24, Alpine 3.23, Alpine 3.22 +2 more 3.3.1-r0

alpine advisories ALPINE-CVE-2024-27281

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • ruby Azure Linux 3.0 3.3.3-1
  • ruby CBL-Mariner 2.0 3.1.4-4

azure linux advisories AZL-40523AZL-40675

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2024-27281 updated cvss 4.5

ruby: RCE vulnerability with .rdoc_options in RDoc

  • Red Hat Enterprise Linux 6 ruby, ruby-ri, ruby-irb, ruby-libs, ruby-rdoc, ruby-tcltk Red Hat Enterprise Linux 7 ruby, ruby-irb, rubygems, ruby-libs, ruby-tcltk, rubygem-json, +6 more
    affected: workaround, no fix planned “Out of support scope”
  • Red Hat Satellite 6 satellite-installer
    affected: workaround, no fix planned “Will not fix”
  • Red Hat Software Collections rh-ruby30-ruby, rh-ruby30-rubygems, rh-ruby30-ruby-libs, rh-ruby30-rubygem-irb, rh-ruby30-rubygem-rbs, rh-ruby30-rubygem-rss, +12 more Red Hat Storage 3 ruby, ruby-irb, rubygems, ruby-libs, rubygem-json, rubygem-rake, +11 more
    affected: workaround, no fix planned “Out of support scope”
  • Red Hat Enterprise Linux AppStream (v. 8) ruby 3.3.1-2.module+el8.10.0+21860+47fbda2a, ruby 2.5.9-112.module+el8.10.0+22021+135c76a8, ruby 3.0.7-143.module+el8.10.0+21858+d19f3934, ruby 3.1.5-143.module+el8.10.0+21792+e2f63d26, rubygems 3.5.9-2.module+el8.10.0+21860+47fbda2a, ruby-libs 3.3.1-2.module+el8.10.0+21860+47fbda2a, +86 more
    fixed: vendor fix RHSA-2024:4499
  • Red Hat Enterprise Linux AppStream (v. 9) ruby 3.0.7-162.el9_4, ruby-libs 3.0.7-162.el9_4, rubygems 3.2.33-162.el9_4, rubygem-irb 1.3.5-162.el9_4, rubygem-rbs 1.4.0-162.el9_4, rubygem-rss 0.2.9-162.el9_4, +58 more Red Hat Enterprise Linux CRB (v. 9) ruby-doc 3.0.7-162.el9_4
    fixed: vendor fix RHSA-2024:3838
  • Red Hat Enterprise Linux 10 ruby Red Hat OpenStack Platform 16.1 puppet-dns Red Hat OpenStack Platform 16.2 puppet-dns, puppet-memcached Red Hat OpenStack Platform 17.1 puppet-memcached
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
Proof of concept is public
Automatable
no
Technical impact
partial
Assessed
2 y ago

Exploit prediction

1.57% chance of exploitation in the next 30 days, higher than 75% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CISA ADP 3.1 4.5 CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
GitHub 3.1 4.5 CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
CNA 3.1 4.5 CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L

Affected packages

ecosystem package affected fixed in
rubygems rdoc
>=6.3.3, <6.3.4.1
>=6.4.0, <6.4.1.1
>=6.5.0, <6.5.1.1
>=6.6.0, <6.6.3.1
6.3.4.1
6.4.1.1
6.5.1.1
6.6.3.1

Affected products

  • ruby rdoc

Classification

Weakness
  • CWE-502 Deserialization of Untrusted Data
  • CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.