# CVE-2022-29970: sinatra does not validate expanded path matches

- Severity: High 7.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.14%, higher than 82% of CVEs (2026-12-01)
- Published: 2022-05-02T00:00:00.000Z
- Modified: 2026-06-17T04:41:03.527Z
- Also known as: GHSA-qp49-3pvw-x4m5
- Weaknesses: CWE-22, CWE-426
- Assigned by: mitre

## Description

Sinatra before 2.2.0 does not validate that the expanded path matches public_dir when serving static files.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- sinatra (RubyGems): before 2.2.0
- sinatrarb sinatra: before 2.2.0
- debian debian_linux: 10.0

## Every score

- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:P/I:N/A:N`

## References

- <https://github.com/sinatra/sinatra/pull/1683/commits/462c3ca1db53ed3cfc394cf5948e9c948ad1c10e> (patch, third-party-advisory, web)
- <https://lists.debian.org/debian-lts-announce/2022/10/msg00034.html> (mailing-list, third-party-advisory, web)
- <https://lists.debian.org/debian-lts-announce/2024/09/msg00020.html> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-29970> (advisory)
- <https://github.com/sinatra/sinatra/pull/1683> (web)
- <https://github.com/skylightio/skylight-ruby/pull/294> (web)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sinatra/CVE-2022-29970.yml> (web)
- <https://github.com/sinatra/sinatra> (web)

## Sources

- CVE List: [CVE-2022-29970](https://www.cve.org/CVERecord?id=CVE-2022-29970), CVE Terms of Use, modified 2025-11-04
- GitHub Advisory Database: [GHSA-qp49-3pvw-x4m5](https://github.com/advisories/GHSA-qp49-3pvw-x4m5), CC-BY-4.0, modified 2025-11-04
- NVD: [CVE-2022-29970](https://nvd.nist.gov/vuln/detail/CVE-2022-29970), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-29970 · Whole record: https://cve.day/CVE-2022-29970.json · Rebuilt by cve.day 2026-11-25T22:58:11.331Z
