Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
💎
💎 RubyGems
Not in CISA KEV
HIGH severity

CVE-2021-28966 — tmpdir

HIGHFix: ruby/tmpdir#8

CVE-2021-28966 is a high-severity (CVSS 7.5) Path Traversal vulnerability in tmpdir. 1 public exploit reference exists, so weaponization risk is real. A fix is available for tmpdir — see the affected versions and patch details below.

Tempfile on Windows path traversal vulnerability

Also known asBIT-ruby-2021-28966BIT-ruby-min-2021-28966GHSA-46f2-3v63-3xrp
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
1 known
Exploitation data as of Oct 11, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
58.0%probability of exploitation in next 30 days
High Risk+0.91%
Lower risk than most CVEs99th percentile — riskier than 99% of all scored CVEsHighest risk
0.00%25.1%50.3%75.4%0.3%58.0%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2021-28966 by exploitation likelihood (EPSS) against impact (CVSS). In the shaded patch-first corner (EPSS 50%+, CVSS 7.0+).

Where this sits among everything scored

Of 385,987 CVEs with a current EPSS score, this one falls in the 50–90% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

1 pkg affected
💎tmpdir

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.

Description

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.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
💎RubyGemstmpdirall versions0.1.2bundle update tmpdir --conservative

Affected Products

1 product · 2 configurations
Application
rubyruby-lang
≥ 3.0.0 && < 3.0.1
range
Exploits & PoCs
1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for tmpdir, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update tmpdir to 0.1.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-28966 is resolved across your whole dependency graph.

  3. Workarounds

    Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.

Frequently Asked Questions

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.
O3 Security · Impact-Aware SCA

Is CVE-2021-28966 in your dependencies?

Find it across RubyGems, including transitive dependencies.

CVE-2021-28966: tmpdir — Fixed in 0.1.2