# CVE-2021-28966: Tempfile on Windows path traversal vulnerability

- Severity: High 7.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 58.0%, higher than 99% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-05-06T15:01:36.000Z
- Modified: 2026-09-08T08:48:19.333Z
- Also known as: GHSA-46f2-3v63-3xrp, BIT-RUBY-2021-28966, BIT-RUBY-MIN-2021-28966
- Weaknesses: CWE-22
- Assigned by: mitre

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

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- tmpdir (RubyGems): before 0.1.2
- ruby-lang ruby: before 2.7.3; from 3.0.0 before 3.0.1
- ruby (Bitnami): before 2.7.3; from 3.0.0 before 3.0.1
- ruby-min (Bitnami): before 2.7.3; from 3.0.0 before 3.0.1

## Every score

- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:P/A:N`
- Bitnami Vulnerability Database: rating High

## References

- <https://hackerone.com/reports/1131465> (exploit, advisory, issue-tracking, patch, third-party-advisory, web)
- <https://security.netapp.com/advisory/ntap-20210902-0004/> (advisory, third-party-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-28966> (advisory, web)
- <https://github.com/ruby/tmpdir/pull/8> (web)
- <https://github.com/ruby/tmpdir/commit/93798c01cb7c10476e50a4d80130a329ba47f348> (web)
- <https://github.com/ruby/tmpdir> (package)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/tmpdir/CVE-2021-28966.yml> (web)
- <https://rubygems.org/gems/tmpdir> (web)
- <https://security.netapp.com/advisory/ntap-20210902-0004> (web)
- <https://www.ruby-lang.org/en/news/2021/04/05/tempfile-path-traversal-on-windows-cve-2021-28966> (web)

## Sources

- CVE List: [CVE-2021-28966](https://www.cve.org/CVERecord?id=CVE-2021-28966), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-46f2-3v63-3xrp](https://github.com/advisories/GHSA-46f2-3v63-3xrp), CC-BY-4.0, modified 2025-01-27
- NVD: [CVE-2021-28966](https://nvd.nist.gov/vuln/detail/CVE-2021-28966), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-RUBY-2021-28966](https://osv.dev/vulnerability/BIT-RUBY-2021-28966), Apache-2.0, modified 2026-09-08
- Bitnami Vulnerability Database: [BIT-RUBY-MIN-2021-28966](https://osv.dev/vulnerability/BIT-RUBY-MIN-2021-28966), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2021-28966 · Whole record: https://cve.day/CVE-2021-28966.json · Rebuilt by cve.day 2026-11-25T22:58:02.889Z
