CVE-2019-18978 The rack-cors rubygem may allow directory traveral
Attackers can use directory traversal to access private resources in applications using the rack-cors Ruby gem.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2019-18978?
CVE-2019-18978 is a medium-severity path traversal vulnerability in Canonical Ubuntu Linux, published on 14 Nov 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
An issue was discovered in the rack-cors (aka Rack CORS Middleware) gem before 1.0.4 for Ruby. It allows ../ directory traversal to access private resources because resource matching does not ensure that pathnames are in a canonical format.
Weakness: CWE-22
Which versions are affected by CVE-2019-18978?
2 open source packages ship an affected version, including rack-cors. It affects 3 products.
| Package | Affected | Fixed in |
|---|---|---|
rack-cors RubyGems | All versions | 1.0.4 |
rack-cors RubyGems | All versions | 1.0.4 |
Products include Canonical Ubuntu Linux, Debian Debian Linux, Rack-Cors Project Rack-Cors.
How do I fix CVE-2019-18978?
Upgrade rack-cors to 1.0.4 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2019-18978 being exploited?
There is no known exploitation of CVE-2019-18978 in the wild and no public exploit code.
Other vulnerabilities in Canonical Ubuntu Linux
Sources
Also known as DEBIAN-CVE-2019-18978, DLA-2096-1, DLA-2389-1, DSA-4918-1, GHSA-pf8f-w267-mq2h, UBUNTU-CVE-2019-18978 and 1 more.