In RDoc 3.11 through 6.x before 6.3.1, as distributed with Ruby through 3.0.1, it is…
Priority LOW 36CWE-78Published · Updated
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- High
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 9 fixed, 2 without a fix
Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-78.
Summary
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.
Why it matters now
Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.0148 74th percentileScored 2026-11-07
Fix Partial rdoc (RubyGems): 6.1.2.1, 6.2.1.1, 6.3.1Red Hat: 9 advisoriesRed Hat: 9 fixed, 2 without a fix
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
| — | rdoc (RubyGems) | 3.11 to before 6.1.2.1 | 6.1.2.1 | Patch available | GHSA-ggxm-pgc9-g7fp |
| — | rdoc (RubyGems) | 6.2.0 to before 6.2.1.1 | 6.2.1.1 | Patch available | GHSA-ggxm-pgc9-g7fp |
| — | rdoc (RubyGems) | 6.3.0 to before 6.3.1 | 6.3.1 | Patch available | GHSA-ggxm-pgc9-g7fp |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
- rdoc (RubyGems) Vendor— Affected 3.11 to before 6.1.2.1 Fixed in 6.1.2.1 Patch available GHSA-ggxm-pgc9-g7fp
- rdoc (RubyGems) Vendor— Affected 6.2.0 to before 6.2.1.1 Fixed in 6.2.1.1 Patch available GHSA-ggxm-pgc9-g7fp
- rdoc (RubyGems) Vendor— Affected 6.3.0 to before 6.3.1 Fixed in 6.3.1 Patch available GHSA-ggxm-pgc9-g7fp
CPE configurations NVD · 5
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* | 9.0 | Vulnerable | Debian |
| cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* | 10.0 | Vulnerable | Debian |
| cpe:2.3:a:ruby-lang:rdoc:*:*:*:*:*:ruby:*:* | 3.11 to before 6.3.1 | Vulnerable | ruby |
| cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:* | up to 3.0.1 | Running on | ruby |
| cpe:2.3:a:oracle:jd_edwards_enterpriseone_tools:*:*:*:*:*:*:*:* | before 9.2.6.1 | Vulnerable | Oracle |
- cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* Versions 9.0 Vulnerable ·Debian
- cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* Versions 10.0 Vulnerable ·Debian
- cpe:2.3:a:ruby-lang:rdoc:*:*:*:*:*:ruby:*:* Versions 3.11 to before 6.3.1 Vulnerable ·ruby
- cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:* Versions up to 3.0.1 Running on ·ruby
- cpe:2.3:a:oracle:jd_edwards_enterpriseone_tools:*:*:*:*:*:*:*:* Versions before 9.2.6.1 Vulnerable ·Oracle
Remediation
- Fix · GHSA-ggxm-pgc9-g7fp rdoc (RubyGems) Fixed in 6.1.2.1 Advisory →
- Fix · GHSA-ggxm-pgc9-g7fp rdoc (RubyGems) Fixed in 6.2.1.1 Advisory →
- Fix · GHSA-ggxm-pgc9-g7fp rdoc (RubyGems) Fixed in 6.3.1 Advisory →
Red Hat 9 advisories
- RHSA-2022:0708 Released 2022-02-28 · Red Hat rating Importantrh-ruby26-ruby security, bug fix, and enhancement update
- Red Hat Software Collections for RHEL Workstation(v. 7) rh-ruby26-ruby-2.6.9-120.el7, rh-ruby26-ruby-devel-2.6.9-120.el7, rh-ruby26-ruby-doc-2.6.9-120.el7 +18
- Red Hat Software Collections for RHEL(v. 7) rh-ruby26-ruby-2.6.9-120.el7, rh-ruby26-ruby-devel-2.6.9-120.el7, rh-ruby26-ruby-doc-2.6.9-120.el7 +18
- RHSA-2022:0672 Released 2022-02-24 · Red Hat rating Moderateruby:2.5 security update
- Red Hat Enterprise Linux AppStream (v. 8) ruby-2.5.9-109.module+el8.5.0+14275+d9c243ca.aarch64::ruby:2.5, ruby-2.5.9-109.module+el8.5.0+14275+d9c243ca.i686::ruby:2.5, ruby-2.5.9-109.module+el8.5.0+14275+d9c243ca.ppc64le::ruby:2.5 +47
- RHSA-2022:0582 Released 2022-02-21 · Red Hat rating Importantruby:2.6 security update
- Red Hat Enterprise Linux AppStream EUS (v. 8.2) ruby-2.6.9-107.module+el8.2.0+14086+86d863af.aarch64::ruby:2.6, ruby-2.6.9-107.module+el8.2.0+14086+86d863af.i686::ruby:2.6, ruby-2.6.9-107.module+el8.2.0+14086+86d863af.ppc64le::ruby:2.6 +47
Show 6 more Red Hat advisories
- RHSA-2022:0581 Released 2022-02-21 · Red Hat rating Importantruby:2.6 security update
- Red Hat Enterprise Linux AppStream E4S (v. 8.1) ruby-2.6.9-107.module+el8.1.0+14088+04cf326e.i686::ruby:2.6, ruby-2.6.9-107.module+el8.1.0+14088+04cf326e.ppc64le::ruby:2.6, ruby-2.6.9-107.module+el8.1.0+14088+04cf326e.src::ruby:2.6 +47
- RHSA-2022:0544 Released 2022-02-16 · Red Hat rating Importantruby:2.6 security update
- Red Hat Enterprise Linux AppStream EUS (v.8.4) ruby-2.6.9-108.module+el8.4.0+14070+b3717926.aarch64::ruby:2.6, ruby-2.6.9-108.module+el8.4.0+14070+b3717926.i686::ruby:2.6, ruby-2.6.9-108.module+el8.4.0+14070+b3717926.ppc64le::ruby:2.6 +47
- RHSA-2022:0543 Released 2022-02-16 · Red Hat rating Importantruby:2.6 security update
- Red Hat Enterprise Linux AppStream (v. 8) ruby-2.6.9-108.module+el8.5.0+13719+08a8ba32.aarch64::ruby:2.6, ruby-2.6.9-108.module+el8.5.0+13719+08a8ba32.i686::ruby:2.6, ruby-2.6.9-108.module+el8.5.0+13719+08a8ba32.ppc64le::ruby:2.6 +47
- RHSA-2021:3982 Released 2021-10-25 · Red Hat rating Importantrh-ruby30-ruby security update
- Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-ruby30-ruby-3.0.2-148.el7, rh-ruby30-ruby-default-gems-3.0.2-148.el7, rh-ruby30-ruby-devel-3.0.2-148.el7 +18
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) rh-ruby30-ruby-3.0.2-148.el7, rh-ruby30-ruby-default-gems-3.0.2-148.el7, rh-ruby30-ruby-devel-3.0.2-148.el7 +18
- Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-ruby30-ruby-3.0.2-148.el7, rh-ruby30-ruby-default-gems-3.0.2-148.el7, rh-ruby30-ruby-devel-3.0.2-148.el7 +18
- RHSA-2021:3559 Released 2021-09-20 · Red Hat rating Importantrh-ruby27-ruby security update
- Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-ruby27-ruby-2.7.4-130.el7, rh-ruby27-ruby-devel-2.7.4-130.el7, rh-ruby27-ruby-doc-2.7.4-130.el7 +19
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) rh-ruby27-ruby-2.7.4-130.el7, rh-ruby27-ruby-devel-2.7.4-130.el7, rh-ruby27-ruby-doc-2.7.4-130.el7 +19
- Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-ruby27-ruby-2.7.4-130.el7, rh-ruby27-ruby-devel-2.7.4-130.el7, rh-ruby27-ruby-doc-2.7.4-130.el7 +19
- RHSA-2021:3020 Released 2021-08-05 · Red Hat rating Importantruby:2.7 security update
- Red Hat Enterprise Linux AppStream (v. 8) ruby-2.7.4-137.module+el8.4.0+12025+f744ca41.aarch64::ruby:2.7, ruby-2.7.4-137.module+el8.4.0+12025+f744ca41.i686::ruby:2.7, ruby-2.7.4-137.module+el8.4.0+12025+f744ca41.ppc64le::ruby:2.7 +47
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat 3scale API Management Platform 2 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 7 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux AppStream (v. 8) | Fixed | RHSA-2021:3020, RHSA-2022:0543, RHSA-2022:0672 |
| Red Hat Enterprise Linux AppStream E4S (v. 8.1) | Fixed | RHSA-2022:0581 |
| Red Hat Enterprise Linux AppStream EUS (v. 8.2) | Fixed | RHSA-2022:0582 |
| Red Hat Enterprise Linux AppStream EUS (v.8.4) | Fixed | RHSA-2022:0544 |
| Red Hat Software Collections for RHEL Workstation(v. 7) | Fixed | RHSA-2022:0708 |
| Red Hat Software Collections for RHEL(v. 7) | Fixed | RHSA-2022:0708 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) | Fixed | RHSA-2021:3559, RHSA-2021:3982 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) | Fixed | RHSA-2021:3559, RHSA-2021:3982 |
| Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) | Fixed | RHSA-2021:3559, RHSA-2021:3982 |
Not affected: 2 products
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 9
Timeline
- 2026-10-02 Threatist record created from CVE-2021-31799
- 2026-10-03 Alias added: GHSA-ggxm-pgc9-g7fp
References
Patch 2
Advisory 5
Other 5
- https://github.com/ruby/rdoc/commit/a7f5d6ab88632b3b482fe10611382ff73d14eed7
- https://github.com/ruby/rdoc
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rdoc/CVE-2021-31799.yml
- https://security.netapp.com/advisory/ntap-20210902-0004
- https://www.ruby-lang.org/en/news/2021/05/02/os-command-injection-in-rdoc
Sources
- CVE-2021-31799 · CVE Program
- CVE-2021-31799 · NVD
- FIRST EPSS
- GHSA-ggxm-pgc9-g7fp · GitHub Advisory Database · CC BY 4.0
- CVE-2021-31799 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences