{"schemaVersion":3,"id":"CVE-2022-29970","aliases":["MGASA-2022-0280","SUSE-SU-2022:2046-1","RHSA-2022:2253","RHSA-2022:2255","RHSA-2022:2256","RHSA-2022:4587","RHSA-2022:4661","UBUNTU-CVE-2022-29970","DEBIAN-CVE-2022-29970","DLA-3166-1","GHSA-qp49-3pvw-x4m5"],"status":"published","duplicateOf":null,"title":null,"description":"Sinatra before 2.2.0 does not validate that the expanded path matches public_dir when serving static files.","dates":{"published":"2022-05-02T00:00:00.000Z","modified":"2025-11-04T16:09:45.370Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":7.5,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"OSV · Red hat","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Rubygems","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":5,"severity":"medium","vector":"AV:N/AC:L/Au:N/C:P/I:N/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.02137,"percentile":0.81757,"severity":"low","asOf":"2026-10-20T00:00:00.000Z","change":{"pp":-0.059999999999999984,"baselineDate":"2026-09-20T00:00:00.000Z","baselineScore":0.02197},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.02179,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.02197,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.02197,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.02197,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.02197,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.02197,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.02197,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.02197,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.02197,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.02197,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.02197,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.02197,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.02197,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.02197,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.02197,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.02137,"percentile":0.81757}],"last30":[{"date":"2026-09-20T00:00:00.000Z","score":0.02197,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.02197,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.02197,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.02197,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.02197,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.02197,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.02197,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.02197,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.02197,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.02137,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.02137,"percentile":0.81757}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')","description":"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.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/22.html"}],"affected":[{"vendor":"debian","product":"ruby-sinatra","name":"ruby-sinatra","label":"ruby-sinatra","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/ruby-sinatra","purlType":"deb","versions":[{"text":"< 2.0.5-4+deb10u1","noFixRecorded":false,"fixedIn":null},{"text":"< 2.2.2-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 2.0.5-4+deb10u1 | < 2.2.2-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"ruby-sinatra","name":"ruby-sinatra","label":"ruby-sinatra","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/ruby-sinatra","purlType":"deb","versions":[{"text":"< 1.4.7-3ubuntu0.1~esm2","noFixRecorded":false,"fixedIn":null},{"text":"< 1.4.8-1ubuntu0.1~esm2","noFixRecorded":false,"fixedIn":null},{"text":"< 2.0.8.1-2+deb11u1build0.22.04.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.4.7-3ubuntu0.1~esm2 | < 1.4.8-1ubuntu0.1~esm2 | < 2.0.8.1-2+deb11u1build0.22.04.1","eol":null,"hubHref":null},{"vendor":"debian","product":"debian_linux","name":"debian linux","label":"debian_linux","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"10.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"10.0","eol":{"isEol":true,"eolDate":"2024-06-30T00:00:00.000Z","matchMethod":"cpe","cycle":{"name":"10","label":"10 (Buster)","eolFrom":"2024-06-30T00:00:00.000Z","isLts":false,"isMaintained":true,"latestVersion":"10.13"},"product":{"name":"debian","label":"Debian","category":"os"}},"hubHref":"/vendor/debian/debian_linux"},{"vendor":"RubyGems","product":"sinatra","name":"sinatra","label":"sinatra","ecosystem":"RubyGems","cpePart":null,"purl":"pkg:gem/sinatra","purlType":"gem","versions":[{"text":"< 2.2.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 2.2.0","eol":null,"hubHref":null},{"vendor":"mageia","product":"ruby-sinatra","name":"ruby-sinatra","label":"ruby-sinatra","ecosystem":"Mageia","cpePart":null,"purl":"pkg:rpm/mageia/ruby-sinatra","purlType":"rpm","versions":[{"text":"< 2.0.8.1-1.1.mga8","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 2.0.8.1-1.1.mga8","eol":null,"hubHref":null},{"vendor":"redhat","product":"pcs","name":"pcs","label":"pcs","ecosystem":"Red Hat","cpePart":null,"purl":"pkg:rpm/redhat/pcs","purlType":"rpm","versions":[{"text":"< 0:0.10.4-6.el8_2.2","noFixRecorded":false,"fixedIn":null},{"text":"< 0:0.10.2-4.el8_1.2","noFixRecorded":false,"fixedIn":null},{"text":"< 0:0.10.8-1.el8_4.1","noFixRecorded":false,"fixedIn":null},{"text":"< 0:0.11.1-10.el9_0.1","noFixRecorded":false,"fixedIn":null},{"text":"< 0:0.10.12-6.el8_6.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0:0.10.4-6.el8_2.2 | < 0:0.10.2-4.el8_1.2 | < 0:0.10.8-1.el8_4.1 | < 0:0.11.1-10.el9_0.1 | < 0:0.10.12-6.el8_6.1","eol":null,"hubHref":null},{"vendor":"redhat","product":"pcs-snmp","name":"pcs-snmp","label":"pcs-snmp","ecosystem":"Red Hat","cpePart":null,"purl":"pkg:rpm/redhat/pcs-snmp","purlType":"rpm","versions":[{"text":"< 0:0.10.4-6.el8_2.2","noFixRecorded":false,"fixedIn":null},{"text":"< 0:0.10.2-4.el8_1.2","noFixRecorded":false,"fixedIn":null},{"text":"< 0:0.10.8-1.el8_4.1","noFixRecorded":false,"fixedIn":null},{"text":"< 0:0.11.1-10.el9_0.1","noFixRecorded":false,"fixedIn":null},{"text":"< 0:0.10.12-6.el8_6.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0:0.10.4-6.el8_2.2 | < 0:0.10.2-4.el8_1.2 | < 0:0.10.8-1.el8_4.1 | < 0:0.11.1-10.el9_0.1 | < 0:0.10.12-6.el8_6.1","eol":null,"hubHref":null},{"vendor":"suse","product":"rubygem-sinatra&distro=SUSE OpenStack Cloud Crowbar 8","name":"rubygem-sinatra","label":"rubygem-sinatra&distro=SUSE OpenStack Cloud Crowbar 8","ecosystem":"SUSE Linux Enterprise","cpePart":null,"purl":"pkg:rpm/suse/rubygem-sinatra&distro=SUSE OpenStack Cloud Crowbar 8","purlType":"rpm","versions":[{"text":"< 1.4.6-3.3.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.4.6-3.3.1","eol":null,"hubHref":null},{"vendor":"sinatrarb","product":"sinatra","name":"sinatra","label":"sinatra","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 2.2.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 2.2.0","eol":null,"hubHref":"/vendor/sinatrarb/sinatra"}],"affectedCount":9,"eol":{"hasEol":true,"count":1},"references":[{"url":"https://github.com/sinatra/sinatra/pull/1683/commits/462c3ca1db53ed3cfc394cf5948e9c948ad1c10e","label":"github.com/sinatra/sinatra/pull/1683/commits/462c3ca1db53ed3cfc394cf5948e9c948ad1c10e","hostname":"github.com","tags":["WEB","Patch","Third Party Advisory"]},{"url":"https://lists.debian.org/debian-lts-announce/2022/10/msg00034.html","label":"lists.debian.org/debian-lts-announce/2022/10/msg00034.html","hostname":"lists.debian.org","tags":["Mailing List","WEB","Third Party Advisory"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/09/msg00020.html","label":"lists.debian.org/debian-lts-announce/2024/09/msg00020.html","hostname":"lists.debian.org","tags":["WEB"]},{"url":"https://advisories.mageia.org/MGASA-2022-0280.html","label":"advisories.mageia.org/MGASA-2022-0280.html","hostname":"advisories.mageia.org","tags":["Advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=30542","label":"bugs.mageia.org/show_bug.cgi?id=30542","hostname":"bugs.mageia.org","tags":["REPORT"]},{"url":"https://lists.suse.com/pipermail/sle-security-updates/2022-June/011265.html","label":"lists.suse.com/pipermail/sle-security-updates/2022-June/011265.html","hostname":"lists.suse.com","tags":["WEB"]},{"url":"https://www.suse.com/support/update/announcement/2022/suse-su-20222046-1/","label":"www.suse.com/support/update/announcement/2022/suse-su-20222046-1/","hostname":"www.suse.com","tags":["Advisory"]},{"url":"https://bugzilla.suse.com/1199138","label":"bugzilla.suse.com/1199138","hostname":"bugzilla.suse.com","tags":["REPORT"]},{"url":"https://www.suse.com/security/cve/CVE-2022-29970","label":"www.suse.com/security/cve/CVE-2022-29970","hostname":"www.suse.com","tags":["WEB"]},{"url":"https://access.redhat.com/errata/RHSA-2022:2253","label":"access.redhat.com/errata/RHSA-2022:2253","hostname":"access.redhat.com","tags":["Advisory"]},{"url":"https://access.redhat.com/security/updates/classification/#important","label":"access.redhat.com/security/updates/classification/","hostname":"access.redhat.com","tags":["ARTICLE"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2081096","label":"bugzilla.redhat.com/show_bug.cgi?id=2081096","hostname":"bugzilla.redhat.com","tags":["REPORT"]},{"url":"https://security.access.redhat.com/data/csaf/v2/advisories/2022/rhsa-2022_2253.json","label":"security.access.redhat.com/data/csaf/v2/advisories/2022/rhsa-2022_2253.json","hostname":"security.access.redhat.com","tags":["Advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2022-29970","label":"access.redhat.com/security/cve/CVE-2022-29970","hostname":"access.redhat.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-29970","label":"www.cve.org/CVERecord?id=CVE-2022-29970","hostname":"www.cve.org","tags":["Advisory","REPORT"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-29970","label":"nvd.nist.gov/vuln/detail/CVE-2022-29970","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2022:2255","label":"access.redhat.com/errata/RHSA-2022:2255","hostname":"access.redhat.com","tags":["Advisory"]},{"url":"https://security.access.redhat.com/data/csaf/v2/advisories/2022/rhsa-2022_2255.json","label":"security.access.redhat.com/data/csaf/v2/advisories/2022/rhsa-2022_2255.json","hostname":"security.access.redhat.com","tags":["Advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2022:2256","label":"access.redhat.com/errata/RHSA-2022:2256","hostname":"access.redhat.com","tags":["Advisory"]},{"url":"https://security.access.redhat.com/data/csaf/v2/advisories/2022/rhsa-2022_2256.json","label":"security.access.redhat.com/data/csaf/v2/advisories/2022/rhsa-2022_2256.json","hostname":"security.access.redhat.com","tags":["Advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2022:4587","label":"access.redhat.com/errata/RHSA-2022:4587","hostname":"access.redhat.com","tags":["Advisory"]},{"url":"https://security.access.redhat.com/data/csaf/v2/advisories/2022/rhsa-2022_4587.json","label":"security.access.redhat.com/data/csaf/v2/advisories/2022/rhsa-2022_4587.json","hostname":"security.access.redhat.com","tags":["Advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2022:4661","label":"access.redhat.com/errata/RHSA-2022:4661","hostname":"access.redhat.com","tags":["Advisory"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2081331","label":"bugzilla.redhat.com/show_bug.cgi?id=2081331","hostname":"bugzilla.redhat.com","tags":["REPORT"]},{"url":"https://security.access.redhat.com/data/csaf/v2/advisories/2022/rhsa-2022_4661.json","label":"security.access.redhat.com/data/csaf/v2/advisories/2022/rhsa-2022_4661.json","hostname":"security.access.redhat.com","tags":["Advisory"]},{"url":"https://ubuntu.com/security/CVE-2022-29970","label":"ubuntu.com/security/CVE-2022-29970","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://ubuntu.com/security/notices/USN-7664-1","label":"ubuntu.com/security/notices/USN-7664-1","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2022-29970","label":"security-tracker.debian.org/tracker/CVE-2022-29970","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://github.com/sinatra/sinatra/pull/1683","label":"github.com/sinatra/sinatra/pull/1683","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/skylightio/skylight-ruby/pull/294","label":"github.com/skylightio/skylight-ruby/pull/294","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sinatra/CVE-2022-29970.yml","label":"github.com/rubysec/ruby-advisory-db/blob/master/gems/sinatra/CVE-2022-29970.yml","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/sinatra/sinatra","label":"github.com/sinatra/sinatra","hostname":"github.com","tags":["WEB"]}],"lineage":{"upstream":[],"downstream":["DLA-3877-1","RHSA-2022:8506","SUSE-SU-2022:1729-1","USN-7664-1"],"duplicates":[],"related":["SUSE-SU-2022:1729-1","USN-7664-1"]},"timeline":[{"kind":"published","date":"2022-05-02T00:00:00.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-11-04T16:09:45.370Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":30,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T15:31:09.827Z","stale":false,"partial":false}}