CVE-2020-8161 is a high-severity (CVSS 8.6) CWE-548 vulnerability in rack. A fix is available for rack — see the affected versions and patch details below.
Directory traversal in Rack::Directory app bundled with Rack
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2020-8161 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 395,249 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
rackReal-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
A directory traversal vulnerability exists in rack < 2.2.0 that allows an attacker perform directory traversal vulnerability in the Rack::Directory app that is bundled with Rack which could result in information disclosure.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 💎RubyGems | rack | all versions | 2.1.3bundle update rack --conservative |
Affected Products
ubuntu linuxcanonicaldebian linuxdebianrackrack_projectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for rack, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update rack to 2.1.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2020-8161 is resolved across your whole dependency graph.
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.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Because the following products package the flawed code, but do not use its functionality (Rack::Directory), their impact has been reduced to 'Low': * Red Hat CloudForms * Red Hat OpenStack Platform 13.0 Operational Tools * Red Hat Gluster Storage 3 Red Hat Satellite 6 ships the affected version of RubyGem Rack and is…
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Satellite 6.8 for RHEL 7 | ansible-collection-redhat-satellite-0:1.3.0-1.el7sat | RHSA-2020:4366 |
Frequently Asked Questions
Is CVE-2020-8161 in your dependencies?
Find it across RubyGems, including transitive dependencies.