Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. tmpdir
  4. ›
  5. CVE-2021-28966

CVE-2021-28966: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

May 6, 2021 (updated September 3, 2021)

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

References

  • github.com/advisories/GHSA-46f2-3v63-3xrp
  • github.com/ruby/tmpdir/commit/93798c01cb7c10476e50a4d80130a329ba47f348
  • github.com/ruby/tmpdir/pull/8
  • github.com/rubysec/ruby-advisory-db/blob/master/gems/tmpdir/CVE-2021-28966.yml
  • hackerone.com/reports/1131465
  • nvd.nist.gov/vuln/detail/CVE-2021-28966
  • rubygems.org/gems/tmpdir
  • security.netapp.com/advisory/ntap-20210902-0004/
  • www.ruby-lang.org/en/news/2021/04/05/tempfile-path-traversal-on-windows-cve-2021-28966/

Code Behaviors & Features

Detect and mitigate CVE-2021-28966 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.1.2

Fixed versions

  • 0.1.2

Solution

Upgrade to version 0.1.2 or above.

Impact 7.5 HIGH

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

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

gem/tmpdir/CVE-2021-28966.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:17 +0000.