# CVE-2021-31799: Arbitrary Code Execution in Rdoc

- Severity: High 7.0 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.48%, higher than 74% of CVEs (2026-12-01)
- Published: 2021-07-29T00:00:00.000Z
- Modified: 2026-06-17T03:52:15.297Z
- Also known as: GHSA-ggxm-pgc9-g7fp
- Weaknesses: CWE-74, CWE-77, CWE-78
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: mitre

## 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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- rdoc (RubyGems): from 3.11 before 6.1.2.1; from 6.2.0 before 6.2.1.1; from 6.3.0 before 6.3.1
- debian debian_linux: 9.0; 10.0
- ruby-lang rdoc: from 3.11 before 6.3.1
- oracle jd_edwards_enterpriseone_tools: before 9.2.6.1

## Every score

- CISA-ADP: CVSS:3.1 7.0 High `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 7.0 High `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.0 High `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 4.4 Medium `AV:L/AC:M/Au:N/C:P/I:P/A:P`

## References

- <https://lists.debian.org/debian-lts-announce/2021/10/msg00009.html> (mailing-list, 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)
- <https://security-tracker.debian.org/tracker/CVE-2021-31799> (third-party-advisory, web)
- <https://security.netapp.com/advisory/ntap-20210902-0004/> (third-party-advisory)
- <https://security.gentoo.org/glsa/202401-05> (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)
- <https://security.netapp.com/advisory/ntap-20210902-0004> (web)
- <https://www.ruby-lang.org/en/news/2021/05/02/os-command-injection-in-rdoc> (web)

## Sources

- CVE List: [CVE-2021-31799](https://www.cve.org/CVERecord?id=CVE-2021-31799), CVE Terms of Use, modified 2024-10-15
- GitHub Advisory Database: [GHSA-ggxm-pgc9-g7fp](https://github.com/advisories/GHSA-ggxm-pgc9-g7fp), CC-BY-4.0, modified 2024-11-14
- NVD: [CVE-2021-31799](https://nvd.nist.gov/vuln/detail/CVE-2021-31799), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-31799 · Whole record: https://cve.day/CVE-2021-31799.json · Rebuilt by cve.day 2026-11-25T22:58:02.891Z
