← Vulnerability feed

Vulnerability record · CVE-2021-28966 · published 30 July 2021

CVE-2021-28966: Ruby TmpDir path traversal on Windows allows crafted path injection

Ruby Lang · Ruby

Ruby through 3.0 on Windows mishandles paths when a web application passes a parameter to TmpDir, allowing a crafted path to escape the intended temporary directory. This is a path traversal flaw (CWE-22) that matters because untrusted input reaching TmpDir can redirect file operations outside the temp directory.

7.5 CVSS 3.1 High EPSS 57% · top 1.0% CWE-22 · Path traversal
7.5CVSS 3.1 base score, v2 5.0
57%EPSS exploitation probability, 30 days
NoNot in CISA KEV
1Affected product versions listed by NVD
4References, 2 tagged exploit
17 Jun 2026Last modified by NVD

Description

In Ruby through 3.0 on Windows, a remote attacker can submit a crafted path when a Web application handles a parameter with TmpDir.

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

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 19 September 2026. Confidence: medium.

high priorityCVSS 7.5 with network reachability, no authentication, and high EPSS plus an exploit-tagged reference make this a serious integrity risk despite no KEV listing.

What it is

Ruby through 3.0 on Windows mishandles paths when a web application passes a parameter to TmpDir, allowing a crafted path to escape the intended temporary directory. This is a path traversal flaw (CWE-22) that matters because untrusted input reaching TmpDir can redirect file operations outside the temp directory.

Impact

An attacker can influence where temporary files are created or accessed, enabling writes or reads outside the intended directory. The CVSS vector shows no confidentiality impact but high integrity impact, so the primary gain is tampering with files.

Attack surface

Reached remotely over the network (AV:N) with no authentication (PR:N) and no user interaction (UI:N) when a web application passes an attacker-controlled parameter to TmpDir. The flaw is specific to Ruby on Windows.

Exploitation

Not listed in CISA KEV, but EPSS is 0.57133 (99th percentile) and the HackerOne reference is tagged Exploit, indicating public exploit detail exists.

What to do

  • Upgrade Ruby to a version after 3.0 that contains the fix referenced in the HackerOne report.
  • Validate and sanitize any user-supplied value passed to TmpDir; do not accept raw path input.
  • Run Ruby web applications with least privilege and restrict write access to the temp directory.
  • Apply vendor advisories (for example NetApp) for affected bundled Ruby components.

Detection

  • Monitor for TmpDir usage where the path argument originates from request parameters.
  • Alert on file creation or access events outside the expected temp directory by Ruby processes.
  • Review web application logs for path traversal patterns in parameters feeding temp file handling.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Affected products

1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

LinkTags
https://hackerone.com/reports/1131465 ExploitIssue TrackingPatchThird Party Advisory
https://security.netapp.com/advisory/ntap-20210902-0004/ Third Party Advisory
https://hackerone.com/reports/1131465 ExploitIssue TrackingPatchThird Party Advisory
https://security.netapp.com/advisory/ntap-20210902-0004/ Third Party Advisory

Track CVE-2021-28966 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

10.0CVE-2009-4124Ruby-lang ruby memory buffer overflow vulnerabilityHeap-based buffer overflow in the rb_str_justify function in string.c in Ruby 1.9.1 before 1.9.1-p376 allows context-dependent attackers to execute a…EPSS 3.9%10.0CVE-2008-2662Ruby-lang ruby vulnerabilityMultiple integer overflows in the rb_str_buf_append function in Ruby 1.8.4 and earlier, 1.8.5 before 1.8.5-p231, 1.8.6 before 1.8.6-p230, 1.8.7 befor…EPSS 4.3%10.0CVE-2008-2663Ruby-lang ruby integer overflow vulnerabilityMultiple integer overflows in the rb_ary_store function in Ruby 1.8.4 and earlier, 1.8.5 before 1.8.5-p231, 1.8.6 before 1.8.6-p230, and 1.8.7 before…EPSS 4.5%9.8CVE-2016-2338Ruby-lang ruby out-of-bounds write vulnerabilityAn exploitable heap overflow vulnerability exists in the Psych::Emitter start_document function of Ruby. In Psych::Emitter start_document function he…EPSS 4.7%9.8CVE-2022-28738Ruby-lang ruby double free vulnerabilityA double free was found in the Regexp compiler in Ruby 3.x before 3.0.4 and 3.1.x before 3.1.2. If a victim attempts to create a Regexp from untruste…EPSS 2.9%9.8CVE-2011-4121Ruby-lang ruby inadequate encryption strength vulnerabilityThe OpenSSL extension of Ruby (Git trunk) versions after 2011-09-01 up to 2011-11-03 always generated an exponent value of '1' to be used for private…EPSS 2.5%9.8CVE-2018-16395Ruby-lang openssl vulnerabilityAn issue was discovered in the OpenSSL library in Ruby before 2.3.8, 2.4.x before 2.4.5, 2.5.x before 2.5.2, and 2.6.x before 2.6.0-preview3. When tw…EPSS 11%9.8CVE-2017-17790Ruby-lang ruby injection vulnerabilityThe lazy_initialize function in lib/resolv.rb in Ruby through 2.4.3 uses Kernel#open, which might allow Command Injection attacks, as demonstrated by…EPSS 5.9%

Source: NIST National Vulnerability Database (record CVE-2021-28966), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.