Ruby sinatra: Sinatra before 2.2.0 does not validate that the expanded path matches public_dir when serving static files
Affects ruby-sinatraSource GCVE Database
Not known to be exploited · CVSS 7.5 High : upgrade to 1.4.7-3ubuntu0.1~esm2 soon.
Data as of 25 Oct 2026, 19:02 UTC
- EPSS
- 2.1% chance of exploitation in 30 days – higher than 81% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 1.4.7-3ubuntu0.1~esm2, 1.4.8-1ubuntu0.1~esm2, 2.0.8.1-2+deb11u1build0.22.04.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:NExploitation evidence
Disclosed: evidence found.
CVE published 2 May 2022
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-25.
What to do
Upgrade ruby-sinatra to 1.4.7-3ubuntu0.1~esm2; ruby-sinatra to 1.4.8-1ubuntu0.1~esm2; ruby-sinatra to 2.0.8.1-2+deb11u1build0.22.04.1.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu:Pro:16.04:LTSruby-sinatrapkg:deb/ubuntu/ruby-sinatra@1.4.7-3ubuntu0.1~esm2?arch=source&distro=esm-apps/xenialOther threats | Affected
| Fixed in
|
Ubuntu:Pro:18.04:LTSruby-sinatrapkg:deb/ubuntu/ruby-sinatra@1.4.8-1ubuntu0.1~esm2?arch=source&distro=esm-apps/bionicOther threats | Affected
| Fixed in
|
Ubuntu:22.04:LTSruby-sinatrapkg:deb/ubuntu/ruby-sinatra@2.0.8.1-2+deb11u1build0.22.04.1?arch=source&distro=jammyOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
If you cannot patch yet, restrict access to sensitive files via other means and avoid exposing Sinatra applications with affected versions to untrusted networks.
Description
Sinatra versions before 2.2.0 do not properly validate that the expanded file path matches the configured public_dir when serving static files. This vulnerability could allow an attacker to access files outside the intended public directory.