{"schema_version":"1.7.3","id":"GHSA-qp49-3pvw-x4m5","published":"2022-05-03T00:00:43Z","modified":"2025-11-04T19:59:48.796726Z","aliases":["CVE-2022-29970"],"summary":"sinatra does not validate expanded path matches","details":"Sinatra before 2.2.0 does not validate that the expanded path matches public_dir when serving static files.","affected":[{"package":{"name":"sinatra","ecosystem":"RubyGems","purl":"pkg:gem/sinatra"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.0"}]}],"versions":["0.1.0","0.1.5","0.1.6","0.1.7","0.2.0","0.2.1","0.2.2","0.3.0","0.3.1","0.3.2","0.3.3","0.9.0","0.9.0.1","0.9.0.2","0.9.0.3","0.9.0.4","0.9.0.5","0.9.1","0.9.1.1","0.9.2","0.9.4","0.9.5","0.9.6","1.0","1.0.a","1.0.b","1.1.0","1.1.2","1.1.3","1.1.4","1.1.a","1.1.b","1.2.0","1.2.0.a","1.2.0.c","1.2.0.d","1.2.1","1.2.2","1.2.3","1.2.6","1.2.7","1.2.8","1.2.9","1.3.0","1.3.0.a","1.3.0.b","1.3.0.c","1.3.0.d","1.3.0.e","1.3.0.f","1.3.0.g","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3.6","1.4.0","1.4.0.a","1.4.0.b","1.4.0.c","1.4.0.d","1.4.1","1.4.2","1.4.3","1.4.4","1.4.5","1.4.6","1.4.7","1.4.8","2.0.0","2.0.0.beta1","2.0.0.beta2","2.0.0.rc1","2.0.0.rc2","2.0.0.rc5","2.0.0.rc6","2.0.1","2.0.1.rc1","2.0.2","2.0.3","2.0.4","2.0.5","2.0.6","2.0.7","2.0.8","2.0.8.1","2.1.0"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/05/GHSA-qp49-3pvw-x4m5/GHSA-qp49-3pvw-x4m5.json"}}],"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-29970"},{"type":"WEB","url":"https://github.com/sinatra/sinatra/pull/1683"},{"type":"WEB","url":"https://github.com/sinatra/sinatra/pull/1683/commits/462c3ca1db53ed3cfc394cf5948e9c948ad1c10e"},{"type":"WEB","url":"https://github.com/skylightio/skylight-ruby/pull/294"},{"type":"WEB","url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sinatra/CVE-2022-29970.yml"},{"type":"WEB","url":"https://github.com/sinatra/sinatra"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2022/10/msg00034.html"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2024/09/msg00020.html"}],"database_specific":{"cwe_ids":["CWE-22","CWE-426"],"github_reviewed":true,"github_reviewed_at":"2022-05-03T20:59:50Z","nvd_published_at":"2022-05-02T05:15:00Z","severity":"HIGH"},"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"}]}