CVE-2021-31799
HIGH 7.0CVSS 3.1Arbitrary Code Execution in Rdoc
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.
- Published
- 30 Jul 2021
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-74CWE-77CWE-78
- Also known as
- GHSA-ggxm-pgc9-g7fp
- Sources
- NVDJSONOSV GHSA-ggxm-pgc9-g7fpJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.0 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) | CVSS 3.1 | HIGH 7.0 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 7.0 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 4.4 | AV:L/AC:M/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* |
= 9.0 | |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* |
= 10.0 | |
| NVD | ruby-lang | rdoccpe:2.3:a:ruby-lang:rdoc:*:*:*:*:*:ruby:*:* |
>= 3.11, < 6.3.1 | 6.3.1 |
| NVD | oracle | jd_edwards_enterpriseone_toolscpe:2.3:a:oracle:jd_edwards_enterpriseone_tools:*:*:*:*:*:*:*:* |
< 9.2.6.1 | 9.2.6.1 |
| OSV | RubyGems | rdoc | >= 3.11, < 6.1.2.1 | 6.1.2.1 |
| OSV | RubyGems | rdoc | >= 6.2.0, < 6.2.1.1 | 6.2.1.1 |
| OSV | RubyGems | rdoc | >= 6.3.0, < 6.3.1 | 6.3.1 |
References
- https://lists.debian.org/debian-lts-announce/2021/10/msg00009.html · Third Party Advisory, WEB
- https://security-tracker.debian.org/tracker/CVE-2021-31799 · Third Party Advisory, WEB
- https://security.gentoo.org/glsa/202401-05 · WEB
- https://security.netapp.com/advisory/ntap-20210902-0004/ · Third Party Advisory, WEB
- https://www.oracle.com/security-alerts/cpuapr2022.html · Patch, Third Party Advisory, WEB
- https://www.ruby-lang.org/en/news/2021/05/02/os-command-injection-in-rdoc/ · Patch, Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-31799 · ADVISORY
- https://github.com/ruby/rdoc/commit/a7f5d6ab88632b3b482fe10611382ff73d14eed7 · WEB
- https://github.com/ruby/rdoc · PACKAGE
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rdoc/CVE-2021-31799.yml · WEB
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 30 Jul 2021)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 1 Sep 2021)