CVE-2021-31799
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.
Severity
HIGH
CVSS v3
7.0
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H · source nvd
Exploit chance (EPSS)
1.480%
chance of exploitation in the next 30 days
higher than 74.4% of scored CVEs · 2026-11-17
CISA KEV
Not listed
Public exploit code
None public
Exploit references (NVD and CNA): 0
Metasploit modules: 0
Nuclei templates: 0
Weakness
- CWE-78: Improper Neutralization of Special Elements used in an OS Command
CISA SSVC decision points
| Exploitation | none |
|---|---|
| Automatable | no |
| Technical impact | total |
| Scored | 2024-10-15 |
Timeline
- 2021-07-29Published by the CNA00:00 UTC
- 2021-09-01GitHub advisory published (GHSA-ggxm-pgc9-g7fp)34 days after publication
- 2024-10-15CISA SSVC decision recorded1174 days after publication
Exploit and advisory records
GitHub advisory GHSA-ggxm-pgc9-g7fp, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| RubyGems rdoc | from 3.11 before 6.1.2.1 | 6.1.2.1 |
| RubyGems rdoc | from 6.2.0 before 6.2.1.1 | 6.2.1.1 |
| RubyGems rdoc | from 6.3.0 before 6.3.1 | 6.3.1 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| ruby-lang rdoc | from 3.11 before 6.3.1fixed in 6.3.1 | 6.3.1 |
| debian debian_linux | 10.0no fix listed9.0no fix listed | not listednot listed |
| oracle jd_edwards_enterpriseone_tools | before 9.2.6.1fixed in 9.2.6.1 | 9.2.6.1 |
References
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://www.ruby-lang.org/en/news/2021/05/02/os-command-injection-in-rdoc/
- https://security.gentoo.org/glsa/202401-05
- https://lists.debian.org/debian-lts-announce/2021/10/msg00009.html
- https://security-tracker.debian.org/tracker/CVE-2021-31799
- https://security.netapp.com/advisory/ntap-20210902-0004/
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2021-31799'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2021-31799'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2021-31799'curl 'https://api.contrastcyber.com/cve_products/CVE-2021-31799'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).