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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | ruby-rack-cors | 1.1.1-1 | — |
| Debian 13 | ruby-rack-cors | 1.1.1-1 | — |
| Debian 12 | ruby-rack-cors | 1.1.1-1 | — |
| Debian 10 | ruby-rack-cors | 1.0.2-1+deb10u1 | DSA-4918-1 |
| Debian 9 | ruby-rack-cors | 0.4.0-1+deb9u2 | DLA-2389-1 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 8 | ruby-rack-cors | 0.2.9-1+deb8u1 | DLA-2096-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | ruby-rack-cors | No fix yet | — |
| Ubuntu 16.04 LTS | ruby-rack-cors | 0.4.0-1+deb9u2build0.16.04.1 | USN-4571-1 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| RubyGems | rack-cors | < 1.0.4 | 1.0.4 | GHSA-pf8f-w267-mq2h |
Advisories 4
- USN-4571-1 ruby-rack-cors vulnerability Ubuntu Security Notices (USN) · Apr 27, 2026
- DSA-4918-1 ruby-rack-cors - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-2389-1 ruby-rack-cors - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-2096-1 ruby-rack-cors - security update Debian Security (DSA / DLA) · Mar 9, 2026
References
- https://github.com/cyu/rack-cors/commit/e4d4fc362a4315808927011cbe5afcfe5486f17d
- https://github.com/cyu/rack-cors/compare/v1.0.3...v1.0.4
- [debian-lts-announce] 20200206 [SECURITY] [DLA 2096-1] ruby-rack-cors security update mailing-list
- [debian-lts-announce] 20201001 [SECURITY] [DLA 2389-1] ruby-rack-cors security update mailing-list
- USN-4571-1 vendor-advisory
- DSA-4918 vendor-advisory