VDB
Sign up
MEDIUM5.3

GHSA-pf8f-w267-mq2h

The rack-cors rubygem may allow directory traveral

Quick fix

GHSA-pf8f-w267-mq2h — rack-cors: upgrade to the fixed version with the command below.

bundle update rack-cors

Details

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.

Are you affected?

Enter the version of the package you're using.

Affected packages

RubyGems/rack-cors
Introduced in: 0Fixed in: 1.0.4
Fixbundle update rack-cors

References