Sinatra before 2.2.0 does not validate that the expanded path matches public_dir when serving static files.
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
Link | Tags |
---|---|
https://github.com/sinatra/sinatra/pull/1683/commits/462c3ca1db53ed3cfc394cf5948e9c948ad1c10e | patch third party advisory |
https://lists.debian.org/debian-lts-announce/2022/10/msg00034.html | mailing list third party advisory |