Sinatra before 2.2.0 does not validate that the expanded path matches public_dir when serving static files.
References
https://nvd.nist.gov/vuln/detail/CVE-2022-29970
https://github.com/sinatra/sinatra/pull/1683/commits/462c3ca1db53ed3cfc394cf5948e9c9…