CVE-2021-31799
HIGH7.0EPSS 0.35%Arbitrary Code Execution in Rdoc
Published: 9/1/2021Modified: 12/3/2025
Description
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.
Affected packages (4)
- Alpine/rubyfrom 0, < 2.6.8-r0
- Debian/ruby2.3from 0, < 2.3.3-1+deb9u10
- Debian/ruby2.7from 0, < 2.7.4-1
- RubyGems/rdoc>= 3.11, < 6.1.2.1
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | HIGH7.0 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
References (11)
- ADVISORYhttps://nvd.nist.gov/vuln/detail/CVE-2021-31799
- ADVISORYhttps://security.alpinelinux.org/vuln/CVE-2021-31799
- PATCHhttps://github.com/ruby/rdoc
- WEBhttps://github.com/ruby/rdoc/commit/a7f5d6ab88632b3b482fe10611382ff73d14eed7
- WEBhttps://github.com/rubysec/ruby-advisory-db/blob/master/gems/rdoc/CVE-2021-31799.yml
- WEBhttps://lists.debian.org/debian-lts-announce/2021/10/msg00009.html
- WEBhttps://security.gentoo.org/glsa/202401-05
- WEBhttps://security.netapp.com/advisory/ntap-20210902-0004
- WEBhttps://security-tracker.debian.org/tracker/CVE-2021-31799
- WEBhttps://www.oracle.com/security-alerts/cpuapr2022.html
- WEBhttps://www.ruby-lang.org/en/news/2021/05/02/os-command-injection-in-rdoc