# CVE-2019-18978: The rack-cors rubygem may allow directory traveral

- Severity: Medium 5.3 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.46%, higher than 84% of CVEs (2026-12-01)
- Published: 2019-11-14T20:21:24.000Z
- Modified: 2026-06-17T02:25:39.227Z
- Also known as: GHSA-pf8f-w267-mq2h
- Weaknesses: CWE-22
- Assigned by: mitre

## 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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- rack-cors (RubyGems): before 1.0.4
- rack-cors_project rack-cors: before 1.0.4
- debian debian_linux: 8.0; 9.0; 10.0
- canonical ubuntu_linux: 16.04

## Every score

- GitHub: 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`
- NVD: 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`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:P/I:N/A:N`

## References

- <https://github.com/cyu/rack-cors/commit/e4d4fc362a4315808927011cbe5afcfe5486f17d> (patch, third-party-advisory, web)
- <https://github.com/cyu/rack-cors/compare/v1.0.3...v1.0.4> (patch, third-party-advisory, web)
- <https://lists.debian.org/debian-lts-announce/2020/02/msg00004.html> (mailing-list, third-party-advisory, web)
- <https://lists.debian.org/debian-lts-announce/2020/10/msg00000.html> (mailing-list, third-party-advisory, web)
- <https://usn.ubuntu.com/4571-1/> (third-party-advisory, vendor-advisory)
- <https://www.debian.org/security/2021/dsa-4918> (third-party-advisory, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2019-18978> (advisory)
- <https://github.com/cyu/rack-cors> (package)
- <https://usn.ubuntu.com/4571-1> (web)

## Sources

- CVE List: [CVE-2019-18978](https://www.cve.org/CVERecord?id=CVE-2019-18978), CVE Terms of Use, modified 2024-08-05
- GitHub Advisory Database: [GHSA-pf8f-w267-mq2h](https://github.com/advisories/GHSA-pf8f-w267-mq2h), CC-BY-4.0, modified 2024-02-16
- NVD: [CVE-2019-18978](https://nvd.nist.gov/vuln/detail/CVE-2019-18978), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2019-18978 · Whole record: https://cve.day/CVE-2019-18978.json · Rebuilt by cve.day 2026-11-25T22:57:48.066Z
