VDB

CVE-2021-31799

CVE-2021-31799 PUBLISHED CVSS 7 HIGH

Arbitrary Code Execution in Rdoc

Reported by mitre · Published July 29, 2021

rdoc is fixed in 6.3.1, 6.2.1.1 and 6.1.2.1 (RubyGems)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
rdocRubyGems6.3.1, 6.2.1.1, 6.1.2.1
rubygem-rdocAmazon Linux4.0.0-36.amzn2.0.2
rubygem-bigdecimalAmazon Linux1.2.0-36.amzn2.0.2
rubygemsAmazon Linux2.0.14.1-36.amzn2.0.2
rubygem-psychAmazon Linux2.0.0-36.amzn2.0.2
rdocruby-lang6.3.1

Risk scores

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

Affected products

VendorProductVersions
n/an/an/a
amazon:2rubygem-rdoc0
amazon:2rubygem-bigdecimal0
RubyGemsrdoc6.3.0, 3.11, 6.2.0
amazon:2rubygems0
amazon:2rubygem-psych0
n/an/a*
amazon:2ruby-devel0
amazon:2ruby-tcltk0
amazon:2rubygem-io-console0
amazon:2rubygems-devel0
amazon:2rubygem-rake0
alpineruby0, 0
amazon:2ruby-libs0
amazon:2ruby0
amazon:2rubygem-minitest0
archruby-rdoc0
archgitlab-gitaly0
archgitlab0
amazon:2rubygem-json0

…and 3 more

Timeline

  • Jul 13, 2021 PoC Published
  • Jul 29, 2021 CVE Published
  • Jul 30, 2021 EPSS Score (30 in total, the first dated here)
  • Mar 7, 2026 Distribution Patch (10 in total, the first dated here)
  • Mar 7, 2026 Security Advisory (16 in total, the first dated here)
  • Aug 1, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2021-31799
vulnetix vdb fixes CVE-2021-31799

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2021-31799/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›