{"id":"CVE-2021-28966","aliases":["CVE-2021-28966","GHSA-46f2-3v63-3xrp","BIT-RUBY-2021-28966","BIT-RUBY-MIN-2021-28966"],"related":[],"kind":"vulnerability","state":"published","title":"Tempfile on Windows path traversal vulnerability","summary":"In Ruby through 3.0 on Windows, a remote attacker can submit a crafted path when a Web application handles a parameter with TmpDir.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"en","text":"There is an unintentional directory creation vulnerability in `tmpdir` library bundled with Ruby on Windows. And there is also an unintentional file creation vulnerability in tempfile library bundled with Ruby on Windows, because it uses tmpdir internally.","format":"markdown","source":"ghsa"},{"lang":"es","text":"En Ruby versiones hasta 3.0 en Windows, un atacante remoto puede enviar una ruta diseñada cuando una aplicación web maneja un parámetro con TmpDir","source":"nvd"}],"published":"2021-05-06T15:01:36.000Z","modified":"2026-09-08T08:48:19.333Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:N/I:P/A:N","score":5,"rating":"MEDIUM"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.1.2"}],"ecosystem":"RubyGems","package":"tmpdir","purl":"pkg:gem/tmpdir","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.7.3"},{"status":"affected","introduced":"3.0.0","fixed":"3.0.1"}],"vendor":"ruby-lang","product":"ruby","cpe":"cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.7.3"},{"type":"semver","introduced":"3.0.0","status":"affected","fixed":"3.0.1"}],"ecosystem":"Bitnami","package":"ruby","purl":"pkg:bitnami/ruby","source":"bitnami"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.7.3"},{"type":"semver","introduced":"3.0.0","status":"affected","fixed":"3.0.1"}],"ecosystem":"Bitnami","package":"ruby-min","purl":"pkg:bitnami/ruby-min","source":"bitnami"}],"references":[{"url":"https://hackerone.com/reports/1131465","tags":["advisory","exploit","issue-tracking","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://security.netapp.com/advisory/ntap-20210902-0004/","tags":["advisory","third-party-advisory","x-refsource-confirm","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-28966","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/ruby/tmpdir/pull/8","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/ruby/tmpdir/commit/93798c01cb7c10476e50a4d80130a329ba47f348","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/ruby/tmpdir","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/tmpdir/CVE-2021-28966.yml","tags":["web"],"sources":["ghsa"]},{"url":"https://rubygems.org/gems/tmpdir","tags":["web"],"sources":["ghsa"]},{"url":"https://security.netapp.com/advisory/ntap-20210902-0004","tags":["web"],"sources":["ghsa"]},{"url":"https://www.ruby-lang.org/en/news/2021/04/05/tempfile-path-traversal-on-windows-cve-2021-28966","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-28966","url":"https://www.cve.org/CVERecord?id=CVE-2021-28966","licence":"CVE Terms of Use","modified":"2024-08-03T21:55:12.239Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-46f2-3v63-3xrp","url":"https://github.com/advisories/GHSA-46f2-3v63-3xrp","licence":"CC-BY-4.0","modified":"2025-01-27T08:58:38.818Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-28966","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-28966","licence":"Public domain","modified":"2026-06-17T03:47:06.010Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-RUBY-2021-28966","url":"https://osv.dev/vulnerability/BIT-RUBY-2021-28966","licence":"Apache-2.0","modified":"2026-09-08T08:48:19.333Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-RUBY-MIN-2021-28966","url":"https://osv.dev/vulnerability/BIT-RUBY-MIN-2021-28966","licence":"Apache-2.0","modified":"2026-09-08T08:48:19.230Z"}],"updatedAt":"2026-11-25T22:58:02.889Z","epss":{"score":0.58039,"percentile":0.99103,"date":"2026-12-01T12:00:22.000Z"}}