Vulnerabilities in pkg:gem/rdoc
PACKAGECVE-2024-27281 is a LOW (CVSS 4.5) remote code execution vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Rdoc libraries in the RubyGems ecosystem. The issue involves rdoc rce vulnerability with .rdoc_options. Remediation is available by upgrading affected packages to version 6.3.4.1, 6.4.1.1, 6.5.1.1, 6.6.3.1.
pkg:gem/rdoc
Vulnerability advisories affecting package pkg:gem/rdoc. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-592j-995h-p23j | CVE-2024-27281 | LOW | RDoc RCE vulnerability with .rdoc_options |
| GHSA-ggxm-pgc9-g7fp | CVE-2021-31799 | HIGH | Arbitrary Code Execution in Rdoc |
| GHSA-v2r9-c84j-v7xm | CVE-2013-0256 | MODERATE | RDoc contains XSS vulnerability |
CVE-2024-27281 at a Glance
Security Impact
CVSS: 4.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L).
How to Fix CVE-2024-27281
To remediate this vulnerability, upgrade all affected Rdoc dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade rdoc to 6.3.4.1
Upgrade rdoc to 6.4.1.1
Upgrade rdoc to 6.5.1.1
Upgrade rdoc to 6.6.3.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for rdoc
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-27281, inspect your project dependencies for Rdoc:
inspect dependencies for rdoc
Analyze the terminal output to locate any version of Rdoc in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.3.4.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Rdoc, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-27281 Affected Rdoc Versions
4 component(s)References
Frequently Asked Questions
What is CVE-2024-27281?
Which Rdoc versions are affected?
What version fixes CVE-2024-27281?
Is rdoc affected?
What is the CVSS score of CVE-2024-27281?
What CWE is associated with CVE-2024-27281?
How can I check RubyGems dependencies for CVE-2024-27281?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-592j-995h-p23j",
"modified" : "2026-06-08T23:16:44Z",
"published" : "2024-03-25T19:36:59Z",
"aliases" : [ "CVE-2024-27281" ],
"summary" : "RDoc RCE vulnerability with .rdoc_options",
"details" : "An issue was discovered in RDoc 6.3.3 through 6.6.2, as distributed in Ruby 3.x through 3.3.0.\n\nWhen 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.\n\nWhen loading the documentation cache, object injection and resultant remote code execution are also possible if there were a crafted cache.\n\nWe recommend to update the RDoc gem to version 6.6.3.1 or later. In order to ensure compatibility with bundled version in older Ruby series, you may update as follows instead:\n\n* For Ruby 3.0 users: Update to `rdoc` 6.3.4.1\n* For Ruby 3.1 users: Update to `rdoc` 6.4.1.1\n* For Ruby 3.2 users: Update to `rdoc` 6.5.1.1\n\nYou can use `gem update rdoc` to update it. If you are using bundler, please add `gem \"rdoc\", \">= 6.6.3.1\"` to your `Gemfile`.\n\nNote: 6.3.4, 6.4.1, 6.5.1 and 6.6.3 have a incorrect fix. We recommend to upgrade 6.3.4.1, 6.4.1.1, 6.5.1.1 and 6.6.3.1 instead of them.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rdoc"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.3.3"
}, {
"fixed" : "6.3.4.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rdoc"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.4.0"
}, {
"fixed" : "6.4.1.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rdoc"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.5.0"
}, {
"fixed" : "6.5.1.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rdoc"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.6.0"
}, {
"fixed" : "6.6.3.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-27281"
}, {
"type" : "WEB",
"url" : "https://github.com/ruby/rdoc/commit/1254b0066f312ddbf7fae7a195e66ce5b3bc6656"
}, {
"type" : "WEB",
"url" : "https://github.com/ruby/rdoc/commit/32ff6ba0bebd8ea26f569da5fd23be2937f6a644"
}, {
"type" : "WEB",
"url" : "https://github.com/ruby/rdoc/commit/48617985e9fbc2825219d55f04e3e0e98d2923be"
}, {
"type" : "WEB",
"url" : "https://github.com/ruby/rdoc/commit/811f125a4a0cc968e3eb18e16ea6c1a3b49a11bf"
}, {
"type" : "WEB",
"url" : "https://github.com/ruby/rdoc/commit/a5de13bf0f0c26f8e764e82b5bf4bf8bffc7198e"
}, {
"type" : "WEB",
"url" : "https://github.com/ruby/rdoc/commit/d22ba930f1f611dda531dba04cd3d2531bb3f8a5"
}, {
"type" : "WEB",
"url" : "https://github.com/ruby/rdoc/commit/da7a0c7553ef7250ca665a3fecdc01dbaacbb43d"
}, {
"type" : "WEB",
"url" : "https://github.com/ruby/rdoc/commit/e4a0e71e6f1032f8b4e5e58b4ef60d702c22ce17"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/1187477"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ruby/rdoc"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rdoc/CVE-2024-27281.yml"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2024/09/msg00000.html"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/27LUWREIFTP3MQAW7QE4PJM4DPAQJWXF"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XYDHPHEZI7OQXTQKTDZHGZNPIJH7ZV5N"
}, {
"type" : "WEB",
"url" : "https://www.ruby-lang.org/en/news/2024/03/21/rce-rdoc-cve-2024-27281"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-502", "CWE-74" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2024-03-25T19:36:59Z",
"nvd_published_at" : "2024-05-14T15:11:57Z"
}
}