Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. rdoc
  4. ›
  5. CVE-2021-31799

CVE-2021-31799: Arbitrary Code Execution in Rdoc

September 1, 2021 (updated November 14, 2024)

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.

References

  • github.com/advisories/GHSA-ggxm-pgc9-g7fp
  • github.com/ruby/rdoc
  • github.com/ruby/rdoc/commit/a7f5d6ab88632b3b482fe10611382ff73d14eed7
  • github.com/rubysec/ruby-advisory-db/blob/master/gems/rdoc/CVE-2021-31799.yml
  • lists.debian.org/debian-lts-announce/2021/10/msg00009.html
  • nvd.nist.gov/vuln/detail/CVE-2021-31799
  • security-tracker.debian.org/tracker/CVE-2021-31799
  • security.gentoo.org/glsa/202401-05
  • security.netapp.com/advisory/ntap-20210902-0004
  • www.oracle.com/security-alerts/cpuapr2022.html
  • www.ruby-lang.org/en/news/2021/05/02/os-command-injection-in-rdoc

Code Behaviors & Features

Detect and mitigate CVE-2021-31799 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 3.11 before 6.1.2.1, all versions starting from 6.2.0 before 6.2.1.1, all versions starting from 6.3.0 before 6.3.1

Fixed versions

  • 6.1.2.1
  • 6.2.1.1
  • 6.3.1

Solution

Upgrade to versions 6.1.2.1, 6.2.1.1, 6.3.1 or above.

Impact 7 HIGH

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

Learn more about CVSS

Weakness

  • CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
  • CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')
  • CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Source file

gem/rdoc/CVE-2021-31799.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:46 +0000.