Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. sinatra
  4. ›
  5. CVE-2022-29970

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

May 2, 2022 (updated November 16, 2022)

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

References

  • github.com/advisories/GHSA-qp49-3pvw-x4m5
  • github.com/sinatra/sinatra/pull/1683/commits/462c3ca1db53ed3cfc394cf5948e9c948ad1c10e
  • github.com/skylightio/skylight-ruby/pull/294
  • nvd.nist.gov/vuln/detail/CVE-2022-29970

Code Behaviors & Features

Detect and mitigate CVE-2022-29970 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.2.0

Fixed versions

  • 2.2.0

Solution

Upgrade to version 2.2.0 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

gem/sinatra/CVE-2022-29970.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:55 +0000.