CVE-2022-29970: Path Traversal

Published May 2, 2022
·
Updated

A flaw was found in Sinatra when serving static files from the public directory. The requested path is not validated if it is in the public directory, allowing files outside of the public directory to be served.

Other sources

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

Affected Software

10 affected componentsFixes available
rubygems/sinatra<2.2.0
2.2.0
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
redhat/sinatra<2.2.0
2.2.0
Sinatrarb Sinatra<2.2.0
Debian Debian Linux=10.0

Remediation

Information

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.

Event History

May 2, 2022
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
Description
Data Sourced
via NVD·05:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
May 3, 2022
Advisory Published
12:00 AM

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

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.

2

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

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

3

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.

4

How can I fix CVE-2022-29970?

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

5

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.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203