Security readout for executives and security teams
Plain-English summary
CVE-2021-31799 is a command-injection flaw in RDoc, the Ruby documentation tool. If RDoc processes a specially crafted filename, an attacker with local access or control over files being documented could run code with RDoc’s privileges. This matters most where documentation generation touches untrusted repositories, package contents, or build inputs.
Executive priority
Treat this as a high-priority maintenance and build-pipeline hardening issue, not as an internet-wide emergency based on the provided evidence. Prioritize CI, developer, and package-building systems that handle third-party Ruby code or generated documentation.
Technical view
RDoc 3.11 through 6.x before 6.3.1, as bundled with Ruby through 3.0.1, can execute arbitrary code through crafted filename content involving pipe and tag handling. The CVSS 3.1 score is 7.0 with local attack vector, high complexity, low privileges required, and high confidentiality, integrity, and availability impact.
Likely exposure
Exposure is likely in Ruby environments that include vulnerable RDoc versions, especially developer workstations, CI systems, packaging pipelines, and servers that generate Ruby documentation. Network-facing exposure is not indicated by the sources unless an application or workflow automatically runs RDoc on attacker-controlled files.
Exploitation context
The supplied sources do not report active exploitation, and CISA KEV status is false. The CVSS vector indicates local access, low privileges, and no user interaction, but high attack complexity. Practical risk depends on whether an attacker can place or influence filenames processed by RDoc.
Researcher notes
The record maps to CWE-78 and describes arbitrary code execution through filename parsing in RDoc. The affected range is broad, but the attack vector is local and high complexity. Confirm exposure through actual RDoc version and workflow use rather than Ruby presence alone.
Mitigation direction
- Upgrade RDoc to 6.3.1 or later where possible.
- Apply fixed Ruby packages from the operating system or vendor advisory.
- Update bundled Ruby installations that include vulnerable RDoc versions.
- Avoid running RDoc on untrusted source trees or package contents.
- Check appliance and platform advisories for vendor-specific fixed versions.
Validation and detection
- Inventory Ruby and RDoc versions across workstations, servers, and CI images.
- Confirm RDoc is not older than 6.3.1 unless vendor-patched.
- Review CI and packaging jobs that generate Ruby documentation.
- Check Debian, Gentoo, Oracle, and NetApp advisories for affected packages.
- Document any exception where RDoc remains present but unused.
Public sources used
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
CWE-78: Command execution behavior lookup
Command injection weaknesses can lead defenders to review execution techniques and command interpreter telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Open ATT&CK lookupExecution behavior lookup
The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
Open ATT&CK lookupCVE-2021-31799 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
Open ATT&CK lookup- Severity
- High
- CVSS
- 7 (3.1)
- Known Exploited
- No
- Published
Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
CNA and ADP enrichment extracted from CVE v5
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
CVSS vector scores
1 official scoreWe collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H15.9Primary CVE scoreVulnerability scoring details
Base CVSS 3.1 score
7HighVector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Source materials
- CVE List V5 sourceCVE List V5
- [debian-lts-announce] 20211013 [SECURITY] [DLA 2780-1] ruby2.3 security updateCVE reference · mailing-list
- https://www.oracle.com/security-alerts/cpuapr2022.htmlCVE reference
- https://www.ruby-lang.org/en/news/2021/05/02/os-command-injection-in-rdoc/CVE reference
- https://security-tracker.debian.org/tracker/CVE-2021-31799CVE reference
- https://security.netapp.com/advisory/ntap-20210902-0004/CVE reference
- GLSA-202401-05CVE reference · vendor-advisory
Products and packages named in the record
CWE details
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
