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.
CVE-2021-31799
This high-severity CVE scores 7.0 under NVD CVSS v3. EPSS exploit probability: 1.5%, top 29% of all CVEs by exploit prediction. GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).
- High severity, but no confirmed exploitation yet
A fix is available — apply it.
- CVSS v3
- 7.0
- EG Score
- 7.0(medium)
- EG Risk
- —
- EPSS
- 71.2%
- KEV
- Not listed
Published
July 30, 2021
Last Modified
November 21, 2024
References (12)
- cve@mitrehttps://lists.debian.org/debian-lts-announce/2021/10/msg00009.html
- cve@mitrehttps://security-tracker.debian.org/tracker/CVE-2021-31799
- cve@mitrehttps://security.gentoo.org/glsa/202401-05
- cve@mitrehttps://security.netapp.com/advisory/ntap-20210902-0004/
- cve@mitrehttps://www.oracle.com/security-alerts/cpuapr2022.html
- cve@mitrehttps://www.ruby-lang.org/en/news/2021/05/02/os-command-injection-in-rdoc/
- af854a3a-2127-422b-91ae-364da2661108https://lists.debian.org/debian-lts-announce/2021/10/msg00009.html
- af854a3a-2127-422b-91ae-364da2661108https://security-tracker.debian.org/tracker/CVE-2021-31799
- af854a3a-2127-422b-91ae-364da2661108https://security.gentoo.org/glsa/202401-05
- af854a3a-2127-422b-91ae-364da2661108https://security.netapp.com/advisory/ntap-20210902-0004/
- af854a3a-2127-422b-91ae-364da2661108https://www.oracle.com/security-alerts/cpuapr2022.html
- af854a3a-2127-422b-91ae-364da2661108https://www.ruby-lang.org/en/news/2021/05/02/os-command-injection-in-rdoc/
Vendor Advisories for CVE-2021-31799(5)
These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.
- RHSA-2022:0708Red Hat Product SecurityHigh
Red Hat Security Advisory: rh-ruby26-ruby security, bug fix, and enhancement update
- RHSA-2022:0582Red Hat Product SecurityHigh
Red Hat Security Advisory: ruby:2.6 security update
- RHSA-2022:0581Red Hat Product SecurityHigh
Red Hat Security Advisory: ruby:2.6 security update
- RHSA-2021:3982Red Hat Product SecurityHigh
Red Hat Security Advisory: rh-ruby30-ruby security update
- RHSA-2021:3559Red Hat Product SecurityHigh
Red Hat Security Advisory: rh-ruby27-ruby security update
Patch Availability(10)
| Vendor / Ecosystem | Fixed in / Patch | Released | Source |
|---|---|---|---|
| ubuntu | ruby2.3-tcltk (2.3.1-2~ubuntu16.04.16+esm1) @ xenial | 2026-05-26 | ubuntu |
| redhat | rh-ruby26-ruby-0:2.6.9-120.el7 | 2022-02-28 | redhat |
| redhat | ruby:2.5-8050020220216195847.c5368500 | 2022-02-24 | redhat |
| redhat | ruby:2.6-8010020220201152941.c27ad7f8 | 2022-02-21 | redhat |
| redhat | ruby:2.6-8020020220201131207.4cda2c84 | 2022-02-21 | redhat |
| redhat | ruby:2.6-8050020211215144356.c5368500 | 2022-02-16 | redhat |
| redhat | ruby:2.6-8040020220131135901.522a0ee4 | 2022-02-16 | redhat |
| redhat | rh-ruby30-ruby-0:3.0.2-148.el7 | 2021-10-25 | redhat |
| redhat | rh-ruby27-ruby-0:2.7.4-130.el7 | 2021-09-20 | redhat |
| redhat | ruby:2.7-8040020210728141159.522a0ee4 | 2021-08-05 | redhat |
Patches are aggregated from vendor advisories (Red Hat, Microsoft, Cisco, GitHub) and package ecosystems (OSV, GHSA). Multiple rows for the same upstream release have been deduplicated.
Affected Packages
(1 across 1 ecosystem)
RubyGems(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| rdoc | 6.3.0 | 6.3.1 | — |
Weakness Classification(1)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Additional Vendor Advisories
(5)
Vendors that published advisories for this CVE beyond the curated set above. Broader coverage but minimal per-row detail — click through for the original advisory.
Data Freshness Timeline
(refreshed 14× in last 7d / 46× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
- 2026-07-22 22:47 UTCEG score recompute
- 2026-07-22 14:06 UTCEPSS rescore
- 2026-07-22 14:06 UTCEPSS rescore
- 2026-07-21 15:22 UTCEPSS rescore
- 2026-07-21 15:22 UTCEPSS rescore
- 2026-07-20 17:05 UTCEPSS rescore
- 2026-07-19 14:29 UTCEPSS rescore
- 2026-07-19 14:29 UTCEPSS rescore
- 2026-07-19 02:27 UTCEPSS rescore
- 2026-07-18 15:29 UTCOSV refresh
- 2026-07-18 10:02 UTCEPSS rescore
- 2026-07-18 10:02 UTCEPSS rescore
- 2026-07-16 17:00 UTCEPSS rescore
- 2026-07-16 17:00 UTCEPSS rescore
- 2026-07-15 16:55 UTCEPSS rescore
- 2026-07-15 01:58 UTCEPSS rescore
- 2026-07-13 22:27 UTCEPSS rescore
- 2026-07-13 06:10 UTCEPSS rescore
- 2026-07-12 05:44 UTCEPSS rescore
- 2026-07-12 05:44 UTCEPSS rescore
- 2026-07-11 08:25 UTCEPSS rescore
- 2026-07-11 08:25 UTCEPSS rescore
- 2026-07-09 19:07 UTCEPSS rescore
- 2026-07-08 15:12 UTCEPSS rescore
- 2026-07-07 13:43 UTCEPSS rescore
Show 73 moreShow fewer
- 2026-07-06 16:25 UTCEPSS rescore
- 2026-07-06 02:21 UTCEPSS rescore
- 2026-07-05 02:28 UTCEPSS rescore
- 2026-07-05 02:28 UTCEPSS rescore
- 2026-07-04 06:29 UTCEPSS rescore
- 2026-07-04 06:29 UTCEPSS rescore
- 2026-07-01 15:04 UTCEPSS rescore
- 2026-06-30 23:20 UTCEPSS rescore
- 2026-06-30 23:20 UTCEPSS rescore
- 2026-06-30 21:30 UTCOSV refresh
- 2026-06-29 14:04 UTCEPSS rescore
- 2026-06-28 14:05 UTCEPSS rescore
- 2026-06-28 04:54 UTCEPSS rescore
- 2026-06-28 04:54 UTCEPSS rescore
- 2026-06-27 03:06 UTCEPSS rescore
- 2026-06-25 13:48 UTCEPSS rescore
- 2026-06-25 13:48 UTCEPSS rescore
- 2026-06-24 14:03 UTCEPSS rescore
- 2026-06-24 14:03 UTCEPSS rescore
- 2026-06-23 21:31 UTCEPSS rescore
- 2026-06-23 21:31 UTCEPSS rescore
- 2026-06-22 14:24 UTCEPSS rescore
- 2026-06-22 14:24 UTCEPSS rescore
- 2026-06-21 14:55 UTCEPSS rescore
- 2026-06-21 01:58 UTCEPSS rescore
- 2026-06-21 01:58 UTCEPSS rescore
- 2026-06-19 19:24 UTCEPSS rescore
- 2026-06-19 19:24 UTCEPSS rescore
- 2026-06-18 17:51 UTCEPSS rescore
- 2026-06-18 17:51 UTCEPSS rescore
- 2026-06-17 17:51 UTCEPSS rescore
- 2026-06-16 17:51 UTCEPSS rescore
- 2026-06-16 17:51 UTCEPSS rescore
- 2026-06-15 17:46 UTCEPSS rescore
- 2026-06-14 23:15 UTCEPSS rescore
- 2026-06-13 22:58 UTCEPSS rescore
- 2026-06-13 22:58 UTCEPSS rescore
- 2026-06-13 00:57 UTCOSV refresh
- 2026-06-12 23:10 UTCEPSS rescore
- 2026-06-12 23:10 UTCEPSS rescore
- 2026-06-11 13:58 UTCEPSS rescore
- 2026-06-10 22:16 UTCEPSS rescore
- 2026-06-10 13:20 UTCEPSS rescore
- 2026-06-08 14:15 UTCEPSS rescore
- 2026-06-08 14:15 UTCEPSS rescore
- 2026-06-07 15:23 UTCEPSS rescore
- 2026-06-07 15:23 UTCEPSS rescore
- 2026-06-06 13:46 UTCEPSS rescore
- 2026-06-06 13:46 UTCEPSS rescore
- 2026-06-06 13:46 UTCEPSS rescore
- 2026-06-05 22:45 UTCEPSS rescore
- 2026-06-05 06:09 UTCEPSS rescore
- 2026-06-05 06:09 UTCEPSS rescore
- 2026-06-04 13:10 UTCEPSS rescore
- 2026-06-04 13:10 UTCEPSS rescore
- 2026-06-02 20:11 UTCEPSS rescore
- 2026-06-02 20:11 UTCEPSS rescore
- 2026-06-01 13:50 UTCEPSS rescore
- 2026-06-01 13:50 UTCEPSS rescore
- 2026-05-31 22:29 UTCEPSS rescore
- 2026-05-31 22:29 UTCEPSS rescore
- 2026-05-31 00:15 UTCEPSS rescore
- 2026-05-31 00:15 UTCEPSS rescore
- 2026-05-29 13:42 UTCEPSS rescore
- 2026-05-28 13:43 UTCEPSS rescore
- 2026-05-28 13:43 UTCEPSS rescore
- 2026-05-27 13:39 UTCEPSS rescore
- 2026-05-27 13:39 UTCEPSS rescore
- 2026-05-26 13:42 UTCEPSS rescore
- 2026-05-26 12:56 UTCEG score recompute
- 2026-05-26 12:56 UTCVendor advisory
- 2026-05-26 07:17 UTCEPSS rescore
- 2026-05-26 07:17 UTCEPSS rescore
Related CVEs(same vendor + same CWE)
Same vendor
10 shownredhat
Same CWE
10 shownCWE-78
Frequently asked(5)
What is CVE-2021-31799?
When was CVE-2021-31799 disclosed?
Is CVE-2021-31799 actively exploited?
What is the CVSS score of CVE-2021-31799?
How do I remediate CVE-2021-31799?
Dependency Blast Radius
See which npm, PyPI, Go, and Maven packages are affected by CVE-2021-31799
Is Your Infrastructure Affected by CVE-2021-31799?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.