CVE-2019-18978
The rack-cors rubygem may allow directory traveral
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
NVD Score used
5.3
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.
- Record
CVE-2019-18978- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - CVSS 2.0
- 5.0 Medium
AV:N/AC:L/Au:N/C:P/I:N/A:N - Weakness
- CWE-22
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2019-18978- Updated
- 2026-11-02
EUVDEUVD-2019-0758 No score
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.
- Record
EUVD-2019-0758- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-pf8f-w267-mq2h
5.3
The rack-cors rubygem may allow directory traveral
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.
- Record
GHSA-pf8f-w267-mq2h- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-22
- Updated
- 2026-11-02
OSV
5.3
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.
- Record
CVE-2019-18978- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Updated
- 2026-11-02
OSVDEBIAN-CVE-2019-18978
5.3
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.
- Record
DEBIAN-CVE-2019-18978- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Updated
- 2026-11-02
OSVGHSA-pf8f-w267-mq2h
5.3
The rack-cors rubygem may allow directory traveral
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.
- Record
GHSA-pf8f-w267-mq2h- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-22
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2019-18978
5.3
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.
- Record
UBUNTU-CVE-2019-18978- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Updated
- 2026-11-02
OSVUSN-4571-1 No score
ruby-rack-cors vulnerability
It was discovered that rack-cors did not properly handle relative file paths. An attacker could use this vulnerability to access arbitrary files.
- Record
USN-4571-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
rack-corsRubyGems |
before 1.0.4 | 1.0.4 |
ruby-rack-corsDebian:12 |
before 1.1.1-1 | 1.1.1-1 |
ruby-rack-corsDebian:13 |
before 1.1.1-1 | 1.1.1-1 |
ruby-rack-corsDebian:14 |
before 1.1.1-1 | 1.1.1-1 |
ruby-rack-corsDebian:8 |
before 0.2.9-1+deb8u1, plus listed versions 0.2.9-1 |
0.2.9-1+deb8u1 |
ruby-rack-corsDebian:9 |
before 0.4.0-1+deb9u2, plus listed versions 0.4.0-10.4.0-1+deb9u1 |
0.4.0-1+deb9u2 |
ruby-rack-corsDebian:10 |
before 1.0.2-1+deb10u1, plus listed versions 1.0.2-1 |
1.0.2-1+deb10u1 |
rack-corsRubyGems |
before 1.0.4, plus listed versions 0.1.00.1.10.2.00.2.20.2.4 Show 13 moreShow less0.2.50.2.60.2.70.2.80.2.90.3.00.3.10.4.00.4.11.0.01.0.11.0.21.0.3 |
1.0.4 |
ruby-rack-corsUbuntu:16.04:LTS |
before 0.4.0-1+deb9u2build0.16.04.1, plus listed versions 0.4.0-10.4.0-1+deb9u1build0.16.04.1 |
0.4.0-1+deb9u2build0.16.04.1 |
ruby-rack-corsUbuntu:18.04:LTS |
All versions, plus listed versions 0.4.1-11.0.1-2 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2019-18978 is a medium vulnerability (CVSS 5.3) in Rack-cors Project Rack-cors, published November 14, 2019. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.46%, the 84th percentile. Fixed in rack-cors 1.0.4.