Skip to main content
CVE-2022-29970VulnerabilityPublished Updated

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

0

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

CVSS 3.1 base score
7.5High
How severe the flaw is on the 0–10 CVSS scale.
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:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 2 May 2022

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
Ubuntu:Pro:16.04:LTSruby-sinatrapkg:deb/ubuntu/ruby-sinatra@1.4.7-3ubuntu0.1~esm2?arch=source&distro=esm-apps/xenialOther threatsAffected
  • <1.4.7-3ubuntu0.1~esm2
  • =1.4.6-2
  • =1.4.7-3
Fixed in
  • 1.4.7-3ubuntu0.1~esm2
Ubuntu:Pro:18.04:LTSruby-sinatrapkg:deb/ubuntu/ruby-sinatra@1.4.8-1ubuntu0.1~esm2?arch=source&distro=esm-apps/bionicOther threatsAffected
  • <1.4.8-1ubuntu0.1~esm2
  • =1.4.7-5
  • =1.4.8-1
Fixed in
  • 1.4.8-1ubuntu0.1~esm2
Ubuntu:22.04:LTSruby-sinatrapkg:deb/ubuntu/ruby-sinatra@2.0.8.1-2+deb11u1build0.22.04.1?arch=source&distro=jammyOther threatsAffected
  • <2.0.8.1-2+deb11u1build0.22.04.1
  • =2.0.8.1-2
Fixed in
  • 2.0.8.1-2+deb11u1build0.22.04.1

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.

References

Community reviews

Loading reviews…