VDB
CVE-2021-31799
CVE-2021-31799
PUBLISHED
CVSS 7 HIGH
Arbitrary Code Execution in Rdoc
Reported by mitre · Published July 29, 2021
rdoc is fixed in 6.3.1, 6.2.1.1 and 6.1.2.1 (RubyGems)
In RDoc 3.11 through 6.x before 6.3.1, as distributed with Ruby through 3.0.1, it is possible to execute arbitrary code via | and tags in a filename.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| rdoc | RubyGems | 6.3.1, 6.2.1.1, 6.1.2.1 |
| rubygem-rdoc | Amazon Linux | 4.0.0-36.amzn2.0.2 |
| rubygem-bigdecimal | Amazon Linux | 1.2.0-36.amzn2.0.2 |
| rubygems | Amazon Linux | 2.0.14.1-36.amzn2.0.2 |
| rubygem-psych | Amazon Linux | 2.0.0-36.amzn2.0.2 |
| rdoc | ruby-lang | 6.3.1 |
Risk scores
CVSS 3.1
7
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a | n/a |
| amazon:2 | rubygem-rdoc | 0 |
| amazon:2 | rubygem-bigdecimal | 0 |
| RubyGems | rdoc | 6.3.0, 3.11, 6.2.0 |
| amazon:2 | rubygems | 0 |
| amazon:2 | rubygem-psych | 0 |
| n/a | n/a | * |
| amazon:2 | ruby-devel | 0 |
| amazon:2 | ruby-tcltk | 0 |
| amazon:2 | rubygem-io-console | 0 |
| amazon:2 | rubygems-devel | 0 |
| amazon:2 | rubygem-rake | 0 |
| alpine | ruby | 0, 0 |
| amazon:2 | ruby-libs | 0 |
| amazon:2 | ruby | 0 |
| amazon:2 | rubygem-minitest | 0 |
| arch | ruby-rdoc | 0 |
| arch | gitlab-gitaly | 0 |
| arch | gitlab | 0 |
| amazon:2 | rubygem-json | 0 |
…and 3 more
Timeline
- Jul 13, 2021 PoC Published
- Jul 29, 2021 CVE Published
- Jul 30, 2021 EPSS Score (30 in total, the first dated here)
- Mar 7, 2026 Distribution Patch (10 in total, the first dated here)
- Mar 7, 2026 Security Advisory (16 in total, the first dated here)
- Aug 1, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2021-31799
vulnetix vdb fixes CVE-2021-31799
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-2021-31799/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- [debian-lts-announce] 20211013 [SECURITY] [DLA 2780-1] ruby2.3 security update mailing-list
- GLSA-202401-05 vendor-advisory
- https://nvd.nist.gov/vuln/detail/CVE-2021-31799 advisory
- https://github.com/advisories/GHSA-ggxm-pgc9-g7fp advisory
- https://github.com/ruby/rdoc/commit/a7f5d6ab88632b3b482fe10611382ff73d14eed7 patch
- https://github.com/ruby/rdoc url
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rdoc/CVE-2021-31799.yml advisory
- https://security.netapp.com/advisory/ntap-20210902-0004 advisory
- https://www.ruby-lang.org/en/news/2021/05/02/os-command-injection-in-rdoc url