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

Published: 2021-07-30 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2021-31799 is rated Moderate Risk (53.8/100): CVSS High severity, with medium exploitation likelihood (EPSS 1.48%). Core evidence: EPSS rose +1.13% over the last day, indicating growing attacker interest. Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2021-31799

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 0.35% 1.48% +1.13%
2 2026-03-04 0.14% 0.35% +0.21%
3 2026-03-01 0.14%

Full EPSS history (55 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2021-31799

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
7.0 3.1 HIGH
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.0 5.9 [email protected]
7.0 3.1 HIGH
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.0 5.9 134c704f-9b21-4f2e-91b3-4a467353bcc0
4.4 2.0 MEDIUM
AV:L/AC:M/Au:N/C:P/I:P/A:P Click to expand
Access vector (AV:L)
Requires local access to the target system.
Access complexity (AC:M)
Exploitation needs some favorable conditions, but not exceptional ones.
Authentication (AU:N)
No authentication is required.
Confidentiality impact (C:P)
Partial confidentiality impact.
Integrity impact (I:P)
Partial integrity impact.
Availability impact (A:P)
Partial availability impact.
3.4 6.4 [email protected]

Weakness enumeration for CVE-2021-31799

GitHub Security Advisory for CVE-2021-31799

GHSA-ggxm-pgc9-g7fp · Severity: high · Ecosystem: rubygems — Arbitrary Code Execution in Rdoc

OS Trackers for CVE-2021-31799

vendor priority summary link
alpine CVE-2021-31799: 1 source package rows (ruby); 54 state rows across 9 repos (3.11-main, 3.12-main, 3.17-main, 3.18-main, 3.19-main, 3.20-main, 3.21-main, 3.22-main, edge-main); fixed 13, open 41. https://security.alpinelinux.org/vuln/CVE-2021-31799
debian not yet assigned CVE-2021-31799 not yet assigned priority: Debian including 1 source packages (ruby2.7), 1 status rows across 1 suites (bullseye): resolved 1. https://security-tracker.debian.org/tracker/CVE-2021-31799
gentoo normal CVE-2021-31799: 1 GLSA(s) (202401-05), 1 atom(s) (dev-ruby/rdoc); latest impact normal. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2021-31799
redhat medium https://access.redhat.com/security/cve/CVE-2021-31799
suse high CVE-2021-31799 severity important: SUSE including 359 source package names (2.17-17.3:libruby2_5-2_5-2.5.9-4.20.1, 2.17-17.3:ruby2.5-2.5.9-4.20.1, …), 1150 product×package rows across 266 product lines (Container bci/ruby, Container suse/rmt-server, … (266 product lines)): Fixed 977, Known Affected 160, Known Not Affected 13. https://www.suse.com/security/cve/CVE-2021-31799/
ubuntu medium CVE-2021-31799 medium priority: Ubuntu including 5 source packages (ruby1.9.1, ruby2.0, ruby2.3, ruby2.5, ruby2.7), 44 status rows across 9 suites (bionic, focal, groovy, hirsute, impish, jammy, trusty, upstream, xenial): DNE 33, released 6, needs-triage 5. https://ubuntu.com/security/CVE-2021-31799

Affected software / configurations for CVE-2021-31799

Vendor Product Version Raw CPE
debian debian_linux 9.0 cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
debian debian_linux 10.0 cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
ruby-lang rdoc >= 3.11, < 6.3.1 cpe:2.3:a:ruby-lang:rdoc:*:*:*:*:*:ruby:*:*
oracle jd_edwards_enterpriseone_tools < 9.2.6.1 cpe:2.3:a:oracle:jd_edwards_enterpriseone_tools:*:*:*:*:*:*:*:*

References for CVE-2021-31799

cvelogic Threat Intelligence