CVE-2024-27281
RDoc RCE vulnerability with .rdoc_options
Reported by mitre · Published May 8, 2024
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| ruby3.2-rubygem-rss | Amazon Linux | 0.2.9-180.amzn2023.0.3 |
| ruby3.2-rubygem-bundler | Amazon Linux | 2.4.10-180.amzn2023.0.3 |
| ruby3.2-rubygem-irb | Amazon Linux | 1.6.2-180.amzn2023.0.3 |
| ruby3.2-bundled-gems | Amazon Linux | 3.2.2-180.amzn2023.0.3 |
| ruby-3.1 | Wolfi | 3.1.4-r6 |
| ruby | Amazon Linux | 2.0.0.648-36.amzn2.0.11 |
| ruby3.2-rubygem-bigdecimal | Amazon Linux | 3.1.3-180.amzn2023.0.3 |
| ruby-doc | Amazon Linux | 2.0.0.648-36.amzn2.0.11 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a | n/a |
| amazon:2023 | ruby3.2-rubygem-rss | 0 |
| amazon:2023 | ruby3.2-rubygem-bundler | 0 |
| amazon:2023 | ruby3.2-rubygem-irb | 0 |
| amazon:2023 | ruby3.2-bundled-gems | 0 |
| wolfi | ruby-3.1 | 0 |
| amazon:2 | ruby | 0 |
| amazon:2023 | ruby3.2-rubygem-bigdecimal | 0 |
| amazon:2 | ruby-doc | 0 |
| n/a | n/a | * |
| wolfi | ruby-3.3 | 0 |
| amazon:2 | rubygems-devel | 0 |
| amazon:2023 | ruby3.2-rubygem-power_assert | 0 |
| RubyGems | rdoc | 6.5.0, 6.6.0, 6.4.0 |
| amazon:2023 | ruby3.2-devel | 0 |
| amazon:2 | rubygem-rake | 0 |
| amazon:2 | rubygem-rdoc | 0 |
| amazon:2023 | ruby3.2-rubygem-typeprof | 0 |
| amazon:2023 | ruby3.2-rubygem-rbs | 0 |
| amazon:2023 | ruby3.2-rubygem-psych | 0 |
…and 36 more
Timeline
- Mar 29, 2024 PoC Published (2 in total, the first dated here)
- May 8, 2024 CVE Published
- Oct 4, 2024 Coalition ESS Score (18 in total, the first dated here)
- Feb 14, 2025 EPSS Score (30 in total, the first dated here)
- Mar 17, 2026 Security Advisory (14 in total, the first dated here)
- Oct 13, 2026 Distribution Patch (12 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-27281
vulnetix vdb fixes CVE-2024-27281
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-27281/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- https://nvd.nist.gov/vuln/detail/CVE-2024-27281 advisory
- https://github.com/advisories/GHSA-592j-995h-p23j advisory
- https://github.com/ruby/rdoc/commit/1254b0066f312ddbf7fae7a195e66ce5b3bc6656 patch
- https://github.com/ruby/rdoc/commit/32ff6ba0bebd8ea26f569da5fd23be2937f6a644 patch
- https://github.com/ruby/rdoc/commit/48617985e9fbc2825219d55f04e3e0e98d2923be patch
- https://github.com/ruby/rdoc/commit/811f125a4a0cc968e3eb18e16ea6c1a3b49a11bf patch
- https://github.com/ruby/rdoc/commit/a5de13bf0f0c26f8e764e82b5bf4bf8bffc7198e patch
- https://github.com/ruby/rdoc/commit/d22ba930f1f611dda531dba04cd3d2531bb3f8a5 patch
- https://github.com/ruby/rdoc/commit/da7a0c7553ef7250ca665a3fecdc01dbaacbb43d patch
- https://github.com/ruby/rdoc/commit/e4a0e71e6f1032f8b4e5e58b4ef60d702c22ce17 patch
- https://github.com/ruby/rdoc url
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rdoc/CVE-2024-27281.yml advisory
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/27LUWREIFTP3MQAW7QE4PJM4DPAQJWXF url
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XYDHPHEZI7OQXTQKTDZHGZNPIJH7ZV5N url
- https://www.ruby-lang.org/en/news/2024/03/21/rce-rdoc-cve-2024-27281 url
- https://lists.debian.org/debian-lts-announce/2024/09/msg00000.html url
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/27LUWREIFTP3MQAW7QE4PJM4DPAQJWXF/ url
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XYDHPHEZI7OQXTQKTDZHGZNPIJH7ZV5N/ url