NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
💎
💎 RubyGems
Not in CISA KEV
HIGH severity

sinatra does not validate expanded path matchesGHSA-qp49-3pvw-x4m5

HIGHFix: sinatra/sinatra#1683

GHSA-qp49-3pvw-x4m5 is a high-severity (CVSS 7.5) Path Traversal vulnerability in sinatra. A fix is available for sinatra — see the affected versions and patch details below.

Also known asCVE-2022-29970
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Nov 8, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
2.1%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs82th percentile — riskier than 82% of all scored CVEsHighest risk
0.10%0.96%1.82%2.68%0.6%2.1%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

1 pkg affected
💎sinatra

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.

Description

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

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
💎RubyGemssinatraall versions2.2.0bundle update sinatra --conservative

Affected Products

2 products · 2 configurations
OS
debian linuxdebian
1 version
10.0
Application
sinatrasinatrarb
< 2.2.0
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for sinatra, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update sinatra to 2.2.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-qp49-3pvw-x4m5 is resolved across your whole dependency graph.

  3. Workarounds

    Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatImportant
Workaround published by Red Hat
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.
Source: Red Hat security advisory for GHSA-qp49-3pvw-x4m5 (CC BY 4.0)
ProductFixed inAdvisory
Red Hat Enterprise Linux 8pcs-0:0.10.12-6.el8_6.1RHSA-2022:4661
Red Hat Enterprise Linux 8.1 Update Services for SAP Solutionspcs-0:0.10.2-4.el8_1.2RHSA-2022:2255
Red Hat Enterprise Linux 8.2 Extended Update Supportpcs-0:0.10.4-6.el8_2.2RHSA-2022:2253
Red Hat Enterprise Linux 8.4 Extended Update Supportpcs-0:0.10.8-1.el8_4.1RHSA-2022:2256
Red Hat Enterprise Linux 9pcs-0:0.11.1-10.el9_0.1RHSA-2022:4587
Red Hat Satellite 6.12 for RHEL 8rubygem-sinatra-1:2.2.0-1.el8satRHSA-2022:8506

Frequently Asked Questions

Sinatra before 2.2.0 does not validate that the expanded path matches public_dir when serving static files.
O3 Security · Impact-Aware SCA

Is GHSA-qp49-3pvw-x4m5 in your dependencies?

Find it across RubyGems, including transitive dependencies.

GHSA-qp49-3pvw-x4m5: sinatra — Fixed in 2.2.0