Track vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
7.5
CVE-2021-28966: Ruby on Windows TmpDir Parameter Path Traversal Vulnerability
CVE-2021-28966 · published 5 years ago
Summary
Ruby on Windows can be tricked into writing files to arbitrary locations. This could allow an attacker to put malicious files on the system. To fix this, update Ruby to a version newer than 3.0.
What to do
- Update yukihiro matsumoto tmpdir to version 0.1.2.
Affected software
| Ecosystem | Vendor | Product | Affected versions |
|---|---|---|---|
| rubygems | yukihiro matsumoto | tmpdir |
< 0.1.2 Fix: upgrade to 0.1.2
|
| – | ruby-lang | ruby |
< 2.7.3 >= 3.0.0, < 3.0.1 cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:* |
Original advisory text
In Ruby through 3.0 on Windows, a remote attacker can submit a crafted path when a Web application handles a parameter with TmpDir.
In Ruby through 3.0 on Windows, a remote attacker can submit a crafted path when a Web application handles a parameter with TmpDir.
References
- https://nvd.nist.gov/vuln/detail/CVE-2021-28966
- https://github.com/ruby/tmpdir/pull/8
- https://github.com/ruby/tmpdir/commit/93798c01cb7c10476e50a4d80130a329ba47f348
- https://hackerone.com/reports/1131465
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/tmpdir/CVE-2021-289...
- https://rubygems.org/gems/tmpdir
- https://www.ruby-lang.org/en/news/2021/04/05/tempfile-path-traversal-on-windows-...
- https://security.netapp.com/advisory/ntap-20210902-0004/
- https://github.com/advisories/GHSA-46f2-3v63-3xrp
Internet-facing
14 days
Internal
60 days
- Not known to be exploited
- Can be exploited automatically (estimated)
- Gives an attacker partial control (estimated)
Type
CWE-22Path Traversal
Timeline
Published30 Jul 2021
Updated7 Oct 2026
First seen6 Mar 2026
Track software like this
Free during beta