7.5
CWE
22 426
Advisory Published
Advisory Published
Updated

CVE-2022-29970: Path Traversal

First published: Mon May 02 2022(Updated: )

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

Credit: cve@mitre.org cve@mitre.org

Affected SoftwareAffected VersionHow to fix
redhat/pcs<0:0.10.12-6.el8_6.1
0:0.10.12-6.el8_6.1
redhat/pcs<0:0.10.2-4.el8_1.2
0:0.10.2-4.el8_1.2
redhat/pcs<0:0.10.4-6.el8_2.2
0:0.10.4-6.el8_2.2
redhat/pcs<0:0.10.8-1.el8_4.1
0:0.10.8-1.el8_4.1
redhat/pcs<0:0.11.1-10.el9_0.1
0:0.11.1-10.el9_0.1
redhat/rubygem-sinatra<1:2.2.0-1.el8
1:2.2.0-1.el8
Sinatrarb Sinatra<2.2.0
Debian Debian Linux=10.0
redhat/sinatra<2.2.0
2.2.0

Remedy

Disable the static option which will disable the public_dir option. With this configuration, Sinatra will not serve files from the public directory and therefore files outside of it.

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Parent vulnerabilities

(Appears in the following advisories)

Frequently Asked Questions

  • What is CVE-2022-29970?

    CVE-2022-29970 is a vulnerability in the Sinatra web application framework that allows files outside of the public directory to be served when serving static files.

  • What is the severity level of CVE-2022-29970?

    CVE-2022-29970 has a severity level of high (7).

  • How does CVE-2022-29970 affect Sinatra?

    CVE-2022-29970 affects Sinatra by not validating that the expanded path matches the public directory when serving static files.

  • How can I fix CVE-2022-29970?

    To fix CVE-2022-29970, update to Sinatra version 2.2.0 or later.

  • Are there any references for CVE-2022-29970?

    Yes, you can find references for CVE-2022-29970 at the following links: [1] NVD, [2] GitHub - Sinatra, [3] GitHub - Skylight Ruby

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203