LiveActive security incident?Get immediate response
CVE Record

CVE-2021-31799: In RDoc 3.11 through 6.x before 6.3.1, as distributed with Ruby through 3.0.1, it is possible to execute ar...

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.

HighCVSS 7Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

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.
Prepared
Confidence
high
Sources
7

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

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 · medium confidence lookup

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 lookup
description · low confidence lookup

Execution 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 lookup
cve · low confidence lookup

CVE-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
Vulnerability profileCVE Program record
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

Official CVE source material

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.

1CVSS vectors
0Timeline events
0ADP providers
7Source links

CVSS vector scores

1 official score

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

ScoreVersionSeverityVectorExploitImpactSource
7CVSS 3.1HighCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H15.9Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

7High
CVSS 3.1 vector shape for CVE-2021-31799Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
n/an/an/aListed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-78 · source CWE mapping

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.