Skip to main content
Public proof of conceptFix available

CVE-2024-27281

ruby: RCE vulnerability with .rdoc_options in RDoc

A public proof of concept exists; no exploitation attested.

  • Published2024-05-14
  • Fixed in6.6.3.1 · 6.5.1.1 · 6.4.1.1 · 6.3.4.1
  • WeaknessCWE-502

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

Description

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.

Timeline

dates in UTC
  1. 2024-05-1415:11CVE publishedNVD

Versions per branch

OSV · CISA-ADP
rdoc
BranchAffectedFixed in
6.6≥ 6.6.0, < 6.6.3.16.6.3.1
6.5≥ 6.5.0, < 6.5.1.16.5.1.1
6.4≥ 6.4.0, < 6.4.1.16.4.1.1
6.3≥ 6.3.3, < 6.3.4.16.3.4.1
Ruby rdoc
BranchAffectedFixed in
6.x≥ 6.3.3, ≤ 6.6.2no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • jrubyUbuntu:Pro:14.04:LTSall versions · no fixed version listed
  • jrubyUbuntu:26.10all versions · no fixed version listed
  • jrubyUbuntu:26.04:LTSall versions · no fixed version listed
  • jrubyUbuntu:25.10all versions · no fixed version listed
  • jrubyUbuntu:24.04:LTSall versions · no fixed version listed
  • jrubyUbuntu:20.04:LTSall versions · no fixed version listed
  • jrubyUbuntu:18.04:LTSall versions · no fixed version listed
  • jrubyUbuntu:16.04:LTSall versions · no fixed version listed

355 more package ranges on OSV.dev

Vendor advisories

  • CVE-2024-27281 Red Hat Product Security901 products fixed · 71 known affected

    ruby: RCE vulnerability with .rdoc_options in RDoc

    ruby as a component of Red Hat Enterprise Linux 6 · ruby-devel as a component of Red Hat Enterprise Linux 6 · ruby-docs as a component of Red Hat Enterprise Linux 6 · +68 more

  • RHSA-2024:4499 Red Hat Product Security144 products fixed

    Red Hat Security Advisory: ruby security update

  • RHSA-2024:3838 Red Hat Product Security82 products fixed

    Red Hat Security Advisory: ruby security update

  • RHSA-2024:3671 Red Hat Product Security143 products fixed

    Red Hat Security Advisory: ruby:3.3 security, bug fix, and enhancement update

  • RHSA-2024:3670 Red Hat Product Security146 products fixed

    Red Hat Security Advisory: ruby:3.3 security, bug fix, and enhancement update

  • RHSA-2024:3668 Red Hat Product Security133 products fixed

    Red Hat Security Advisory: ruby:3.1 security, bug fix, and enhancement update

2 more advisories

Full record on NVD

Fix

  1. Update rdoc to 6.6.3.1 · 6.5.1.1 · 6.4.1.1 · 6.3.4.1
  2. Vendor fix Red Hat Product Security RHSA-2024:4499 · 144 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
  3. Vendor fix Red Hat Product Security RHSA-2024:3671 · 143 productsBefore applying this update, make sure all previously released errata relevant to your system have been applied. For details on how to apply this update, refer to: https://access.redhat.com/articles/11258
  4. Vendor fix Red Hat Product Security RHSA-2024:3500 · 117 productsFor details on how to apply this update, refer to: https://access.redhat.com/articles/11258
  5. Workaround from the vendor Red Hat Product Security RHSA-2024:4499 · 144 productsMitigation 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.
  6. No fix planned, says the vendor Red Hat Product Security CVE-2024-27281 · 69 productsOut of support scope
  7. No fix planned, says the vendor Red Hat Product Security CVE-2024-27281 · 2 productsWill not fix

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
Published
2024-05-14
Last Modified
2026-06-17
NVD status
Deferred
GitHub Advisory
GHSA-592j-995h-p23j

Frequently asked questions

What is CVE-2024-27281?

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.

Is CVE-2024-27281 actively exploited?

A proof-of-concept exploit exists for CVE-2024-27281, but active exploitation has not been confirmed at this time.

What is the CVSS score for CVE-2024-27281?

CVE-2024-27281 has a CVSS v3 base score of 4.5 (MEDIUM severity), with vector string CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L.

Running rdoc? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record