Skip to main content
EPSS 2.2%top 19%

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

0
High
Published: 05/02/2022 (05/02/2022, 05:15:00 UTC)
Source: GCVE Database
Product: ruby-sinatra

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.

CVSS v3.1

Score 7.5high

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Affected software

Ubuntu:Pro:16.04:LTSmore threats →ghsa
ruby-sinatra
pkg:deb/ubuntu/[email protected]~esm2?arch=source&distro=esm-apps/xenial
Affected versions
<1.4.7-3ubuntu0.1~esm2=1.4.6-2=1.4.7-3
Ubuntu:Pro:18.04:LTSmore threats →ghsa
ruby-sinatra
pkg:deb/ubuntu/[email protected]~esm2?arch=source&distro=esm-apps/bionic
Affected versions
<1.4.8-1ubuntu0.1~esm2=1.4.7-5=1.4.8-1
Ubuntu:22.04:LTSmore threats →ghsa
ruby-sinatra
pkg:deb/ubuntu/[email protected]+deb11u1build0.22.04.1?arch=source&distro=jammy
Affected versions
<2.0.8.1-2+deb11u1build0.22.04.1=2.0.8.1-2

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/23/2026, 00:04:02 UTC

Technical Analysis

The vulnerability in Ruby Sinatra prior to version 2.2.0 involves insufficient validation of the expanded path against the public_dir when serving static files. This flaw can lead to directory traversal or unauthorized file access by allowing requests to access files outside the designated public directory. The affected versions include specific releases such as 1.4.6-2, 1.4.7-3, 1.4.7-5, 1.4.8-1, and 2.0.8.1-2. There is no indication of known exploits in the wild. No official patch or remediation details are provided in the input data.

Potential Impact

An attacker could exploit this vulnerability to read sensitive files outside the intended public directory, potentially exposing confidential information. The CVSS vector indicates high confidentiality impact with no impact on integrity or availability. This could lead to information disclosure without requiring privileges or user interaction.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, restrict access to sensitive files via other means and avoid exposing Sinatra applications with affected versions to untrusted networks.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
UBUNTU-CVE-2022-29970
Osv Schema Version
1.7.0
Ecosystems
["Ubuntu:Pro:16.04:LTS","Ubuntu:Pro:18.04:LTS","Ubuntu:22.04:LTS"]
Cvss Version
3.1

Threat ID: 6a61512c9c2644c7f8da7099

Added to database: 07/22/2026, 23:24:28 UTC

Last enriched: 07/23/2026, 00:04:02 UTC

Last updated: 09/10/2026, 19:24:52 UTC

Views: 36

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses